Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio Gradle Configuration with name 'default' not found

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!

like image 378
Gyonder Avatar asked Jun 19 '13 10:06

Gyonder


2 Answers

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 
like image 95
guydemossyrock Avatar answered Sep 29 '22 10:09

guydemossyrock


I forgot to pull all submodules. So my

compile project(':something') 

could not be resolved.

Solution

git submodule update --init 
like image 36
passsy Avatar answered Sep 29 '22 11:09

passsy