Android Studio Gradle Sync error: configuration with name 'default' not found -


i using bottomsheet library create bottomsheet menu explained in google documentation.

i added bottomsheet library project when sync gradle getting error message. tried answers listed @ error: configuration name 'default' not found in android studio , other solutions listed on stackoverflow issue still persists.

here build.gradle , settings files of project:

bottomsheet/build.gradle

buildscript {     repositories {         jcenter()     }      dependencies {         classpath 'com.android.tools.build:gradle:1.2.3'     } }  allprojects {     group = pom_group_id     version = pom_version      repositories {         jcenter()       }      tasks.withtype(javacompile) {         options.encoding = "utf-8"     } }   task wrapper(type: wrapper) {     gradleversion = '1.12' } 

app/build.gradle

apply plugin: 'com.android.application'  android {     compilesdkversion 21     buildtoolsversion "21.1.2"      defaultconfig {         applicationid "com.example.khsingh.stockysingh"         minsdkversion 15         targetsdkversion 21         versioncode 1         versionname "1.0"     }     buildtypes {         release {             minifyenabled false             proguardfiles getdefaultproguardfile('proguard-android.txt'), 'proguard-rules.pro'         }     } }  dependencies {     compile filetree(dir: 'libs', include: ['*.jar'])     compile 'com.android.support:appcompat-v7:22.0.0'     compile "com.android.support:appcompat-v7:21.0.+"     compile project(":bottomsheet")    } 

root/build.gradle

// top-level build file can add configuration options common sub-projects/modules.  buildscript {     repositories {         jcenter()     }     dependencies {         classpath 'com.android.tools.build:gradle:1.1.0'         // note: not place application dependencies here; belong         // in individual module build.gradle files      } }  allprojects {     repositories {         jcenter()     } } 

settings.gradle

include ':app', ':bottomsheet' project(':bottomsheet').projectdir = new file('library/bottomsheet') 

add app/build.gradle

compile 'com.cocosw:bottomsheet:1.+@aar' 

if in case, want have full library inc source codes in app, download library source codes described then:

  1. right click on app's root in android studio (left view)
  2. select "open module settings"
  3. select "+" icon on top left of new window
  4. select "import gradle/eclipse project".

now library should in workspace.

  1. select app list of modules
  2. click on "dependencies"
  3. click on green "+" on right , select "library dependency"
  4. select bottomsheets library
  5. apply

android studio should now, automatically insert library app , sync successfully


Comments

Popular posts from this blog

python - TypeError: start must be a integer -

c# - DevExpress RepositoryItemComboBox BackColor property ignored -

django - Creating multiple model instances in DRF3 -