android - Using .aar NoClassDefFoundError But Class Exists and is Dexed -


i have several projects build create .aar. import .aar into android studio under /libs. build.gradle file dependency looks follows:

repositories{     flatdir{         dirs 'libs'     } }  dependencies {     compile filetree(dir: 'libs', include: ['*.jar'])     compile 'com.android.support:appcompat-v7:22.0.0'     compile 'com.google.android.gms:play-services:7.0.0'     compile 'com.android.support:multidex:+'     compile(name: 'customapi-debug', ext:'aar') } 

since library quite large have set multidexenabled = true. android studio finds library , autocomplete works. building works fine running app gives following error:

java.lang.noclassdeffounderror: com.companyx.android.api.ui.vision.metaio.metaioview             @ com.companyx.android.api.ui.vision.metaio.metaioview$$injectadapter.<init>(metaioview$$injectadapter.java:29) 

i uncompressed , disassembled .aar , dex files, respectively, , verified classes complaining exist. i've tried existing approaches dealing problem none of them worked.

anyone else experienced this? in advance.

i run same issue. fix firstly deploy aar file local maven (i utilized plugin @ https://github.com/dcendents/android-maven-gradle-plugin). referenced local maven described @ https://stackoverflow.com/a/23045791/2563009. , declared dependencies transitive option, this:

dependencies {   compile('com.myapp.awesomelib:awesomelib:0.0.1@aar') {     transitive = true   } } 

the error gone then.


Comments

Popular posts from this blog

shopping cart - Page redirect not working PHP -

php - How to modify a menu to show sub-menus -

python - Installing PyDev in eclipse is failed -