Android Studio Gradle Configuration with name 'default' not found

Gyonder picture Gyonder · Jun 19, 2013 · Viewed 240.3k times · Source

I am having problems compiling my app with Android Studio (0.1.5). The app uses 2 libraries which I have included as follows:

settings.gradle

include ':myapp',':library',':android-ColorPickerPreference'

build.gradle

buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:0.4'
    }
}
apply plugin: 'android'

dependencies {
    compile files('libs/android-support-v4.jar')
    compile project(':library')
    compile project(':android-ColorPickerPreference')

}

android {
    compileSdkVersion 17
    buildToolsVersion "17.0.0"

    defaultConfig {
        minSdkVersion 7
        targetSdkVersion 16
    }
}

When compiling I get this message:

  Gradle: A problem occurred configuring project ':myapp'.
   > Failed to notify project evaluation listener.
   > Configuration with name 'default' not found.

Could you help me with this message? Thanks!

Answer

guydemossyrock picture guydemossyrock · Oct 25, 2013

In my case, after compiling with gradle tasks --info, the log was there :

Evaluating project ':libraries:VolleyLibrary' using empty build file.

So it failed to find build.gradle file of the library. Reason is the folder structure.

It was

-libraries
--volley
---VolleyLibrary

It is supposed to be

-libraries
--VolleyLibrary