Android的工作室摇篮项目刷新失败:配置名为“默认”未找到 [英] Android Studio Gradle project refresh failed:Configuration with name 'default' not found

查看:288
本文介绍了Android的工作室摇篮项目刷新失败:配置名为“默认”未找到的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要导入库我的项目。我做了什么:

I want to import library wheel to my project. What I have done:

1. I imported library wheel to Android Studio in order to have build.gradle in it.
2. I created new folder in my project called libraries and put wheel library to it.
3. I put this code to my settings.gradle: include ':app:libraries:wheel'
4. I put this code to build.gradle: compile project('libraries:wheel');
5. I tried to sync gradle but it failed

这就是我的项目的结构是这样的:

That's how my project's structure looks like:

我build.gradle这里:

my build.gradle here:

apply plugin: 'android'

android {
    compileSdkVersion 19
    buildToolsVersion "19.0.3"

    buildTypes {
        defaultConfig {
            minSdkVersion 8
            targetSdkVersion 19
            versionCode 1
            versionName "1.0"
        }
        release {
            runProguard false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
        }
    }
}

dependencies {
    compile 'com.android.support:appcompat-v7:+'
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile project('libraries:wheel');

}

我的设置摇篮:

my settings gradle:

include ':app'
include ':app:libraries:wheel'

我的失败消息:

My failure message:

Gradle 'LiteTap' project refresh failed:
Configuration with name 'default' not found.

我该如何解决这个问题?

How can I fix it?

推荐答案

添加您的库文件夹在你的项目的根位置,并复制所有的库文件存在。对于前YourProject /库,然后将其同步和休息的东西似乎确定了我。

Add your library folder in your root location of your project and copy all the library files there. For ex YourProject/library then sync it and rest things seems OK to me.

过检查<一href="http://stackoverflow.com/questions/22547364/configuration-with-name-default-not-found-android-studio">Configuration名为默认未找到。 Android的工作室和<一href="http://stackoverflow.com/questions/17188489/android-studio-gradle-configuration-with-name-default-not-found">Android工作室摇篮配置名为'默认'未找到。

这篇关于Android的工作室摇篮项目刷新失败:配置名为“默认”未找到的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆