android - java.lang.ClassNotFoundException: Didn't find class from AAR -
i have android library project created aar file. have added aar file application project, while running following exception:
caused by: java.lang.classnotfoundexception: didn't find class "com.creatrixone.customcomponents.loadmorelistview" on path: dexpathlist[[zip file "/data/app/com.creatrixcampus-1.apk"], nativelibrarydirectories=[/data/app-lib/com.creatrixcampus-1, /system/lib]] @ dalvik.system.basedexclassloader.findclass(basedexclassloader.java:53) @ java.lang.classloader.loadclass(classloader.java:501) @ java.lang.classloader.loadclass(classloader.java:461) @ android.view.layoutinflater.createview(layoutinflater.java:559) @ android.view.layoutinflater.createviewfromtag(layoutinflater.java:696) @ android.view.layoutinflater.rinflate(layoutinflater.java:755) @ android.view.layoutinflater.inflate(layoutinflater.java:492) @ android.view.layoutinflater.inflate(layoutinflater.java:397) @ android.view.layoutinflater.inflate(layoutinflater.java:353)
i updated both library , application project gradle file after visiting below link,
android library aar depending on library
but no use, updated library build.gradle file:
buildscript { repositories { mavencentral() } dependencies { classpath 'com.android.tools.build:gradle:2.1.0' classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3' } } apply plugin: 'com.android.library' apply plugin: 'com.github.dcendents.android-maven' version '1.1.1' repositories { mavencentral() } dependencies { compile filetree(dir: 'libs', include: ['*.jar']) compile 'com.android.support:multidex:1.0.0' compile 'com.koushikdutta.ion:ion:2.1.7' compile 'com.nineoldandroids:library:2.4.0' compile 'com.android.support:recyclerview-v7:23.3.0' compile 'com.android.support:design:23.3.0' compile 'com.android.support:appcompat-v7:23.3.0' //session handelling using jwt compile 'io.jsonwebtoken:jjwt:0.6.0' compile 'com.nhaarman.listviewanimations:lib-core:3.1.0@aar' compile 'com.nhaarman.listviewanimations:lib-manipulation:3.1.0@aar' compile 'com.nhaarman.listviewanimations:lib-core-slh:3.1.0@aar' } android { compilesdkversion 23 buildtoolsversion "23.0.2" uselibrary 'org.apache.http.legacy' defaultconfig { //applicationid "com.creatrixone" minsdkversion 15 targetsdkversion 23 versioncode 1 versionname "1.1.1" multidexenabled true } buildtypes { release { minifyenabled false proguardfiles getdefaultproguardfile('proguard-android.txt'), 'proguard-rules.txt' } } packagingoptions { exclude 'meta-inf/license.txt' } productflavors { } dexoptions { incremental true } }
this updated project build.gradle file:
buildscript { repositories { mavencentral() } dependencies { classpath 'com.android.tools.build:gradle:2.1.0' } } apply plugin: 'com.android.application' repositories { mavencentral() maven { url "${system.env.home}/.m2/repository" } flatdir { dirs 'libs' } } android { compilesdkversion 23 buildtoolsversion "23.0.2" uselibrary 'org.apache.http.legacy' defaultconfig { applicationid 'com.creatrixcampus' minsdkversion 15 targetsdkversion 23 versioncode 20160504 versionname "1.5.0" multidexenabled true } buildtypes { release { minifyenabled false proguardfiles getdefaultproguardfile('proguard-android.txt'), 'proguard-rules.pro' } } productflavors { } dexoptions { javamaxheapsize "4g" predexlibraries = false } lintoptions { checkreleasebuilds false } } dependencies { compile filetree(dir: 'libs', include: ['*.jar']) compile 'com.android.support:multidex:1.0.1' compile project(':photoviewerlibrary') compile project(':multipleimagepick') compile 'com.android.support:cardview-v7:23.3.0' compile 'com.android.support:recyclerview-v7:23.3.0' compile 'com.android.support:design:23.3.0' compile 'com.android.support:appcompat-v7:23.3.0' compile ':creatrixone1_1@aar' compile 'com.google.code.gson:gson:2.4' compile 'com.github.alamkanak:android-week-view:1.2.1' compile 'com.google.zxing.client.android:barcode_1.0:1.1.0@aar' compile 'com.google.zxing:android-integration:3.2.0' compile 'com.google.android.gms:play-services-analytics:8.4.0' compile 'com.nineoldandroids:library:2.4.0' compile 'com.google.android.gms:play-services-gcm:8.4.0' compile 'xyz.danoz:recyclerviewfastscroller:0.1.3' //session handelling using jwt compile 'io.jsonwebtoken:jjwt:0.6.0' compile 'com.koushikdutta.ion:ion:2.1.7' }
Comments
Post a Comment