java - Android .aar dependencies aren’t resolving in libraries -


my goal distribute .aar file can used other developers in projects. problem find when try integrate .aar other project, need specify of dependencies in build.gradle file have included in .aar build.gradle.

my question if possible include library dependency , somehow libraries library depends on included in other project.

for example, library defines following dependencies in build.gradle file:

dependencies {     compile filetree(dir: 'libs', include: ['*.jar'])     compile 'org.altbeacon:android-beacon-library:2.3.5'     compile 'commons-codec:commons-codec:1.10' } 

i wrote test app uses library , add module in android studio interface

dependencies {     compile 'com.android.support:appcompat-v7:22.0.0'     compile 'com.google.android.gms:play-services:7.5.0'     compile project(':mylibrary') } 

however, not work. java.lang.verifyerrors @ runtime. ends working include in app's build.gradle file:

dependencies {     compile 'com.android.support:appcompat-v7:22.0.0'     compile 'com.google.android.gms:play-services:7.5.0'       compile filetree(dir: 'libs', include: ['*.jar'])     compile 'org.altbeacon:android-beacon-library:2.3.5'     compile 'commons-codec:commons-codec:1.10'       compile project(':mylibrary') } 

why need include dependencies in both .aar , final application? not understanding how dependencies work? why isn't final application able grab .aar's dependencies maven or jcenter @ build time?


Comments