Android的工作室摇篮项目刷新失败:配置名为“默认”未找到摇篮、未找到、工作室、项目

2023-09-07 01:20:22 作者:一个人走 ゅ

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

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.

过检查Configuration名为默认未找到。 Android的工作室和Android工作室摇篮配置名为'默认'未找到。