Android Studio Gradle project update error: Configuration named 'default' not found

I want to import a library wheelinto my project. What I've 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

What my project structure looks like:

my build.gradle is 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 gradle settings:

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

My error message:

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

How can i fix this?

+1
source share
3 answers

Try running the command gradlew tasks --infoin the terminal,

you can see the "Project Evaluation": libraries: wheel 'using an empty assembly file.

perhaps because it is wheelnot a Android studio project, AS did not find build.gradlefile

, android, YOURPRO\libraries.

android .

, , libraries

wheel .

include:libraries:pullToRefreshListView settings.gradle

+3

compile fileTree (dir: 'libraries', include: ['wheel'])

app gradle

('libraries: wheel')

+1

Add your library folder to the root folder of your project and copy all the library files there. For ex YourProject / library then synchronize it and everything else seems OK to me.

Too Verify A configuration named 'default' was not found. Android Studio and Android Studio Gradle A configuration named 'default' was not found .

0
source

All Articles