1

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:

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?

linkas
  • 175
  • 5
  • 18
  • why didn't you post the failure log messages? – cagcak May 24 '14 at 13:10
  • I think the problem occurs in LiteTap project's setting.gradle which is in lowermost of the project structure. You should also publish that file configuration and check some duplicate questions: http://stackoverflow.com/questions/22547364/configuration-with-name-default-not-found-android-studio http://stackoverflow.com/questions/16905214/problems-trying-to-create-gradle-build/16905808#16905808 http://stackoverflow.com/questions/22743582/error-configuration-with-name-default-not-found-in-android-studio – cagcak May 24 '14 at 16:46
  • I have read this before but nothing really helped...I'm trying to do what people have suggested but nothing works... Do you mean file configuration is that code in settings.gradle? Here it is: include ':app' include ':app:libraries:wheel' – linkas May 24 '14 at 18:51
  • In my case, it had to do with having the filesystem configured as case sensitive. – txulu Aug 13 '14 at 10:32

3 Answers3

3

Try command gradlew tasks --info in terminal,

you may see "Evaluating project ':libraries:wheel' using empty build file."

maybe its because wheel is not an android studio project, AS didn't find build.gradle file

I fix this problem by import the library with android studio rather than direct copy it the YOURPRO\libraries.

How to use a library project in android studio And it works.

Note that it will be more tidy if your create a libraries folder and drag

wheel file after your import. Remember to add

include:libraries:pullToRefreshListView in your settings.gradle file

Community
  • 1
  • 1
armysheng
  • 133
  • 7
  • The command "gradlew tasks --info" save my a lot of time to find which folder is missing within a big project. :) – firemaples Aug 03 '16 at 05:37
1

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

Use this in app's gradle file in dependencies instead of

compile project('libraries:wheel')

lokesh kumar
  • 961
  • 1
  • 10
  • 18
0

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.

Too check Configuration with name 'default' not found. Android Studio and Android Studio Gradle Configuration with name 'default' not found.

Community
  • 1
  • 1
Saeid
  • 2,261
  • 4
  • 27
  • 59