android - NoClassDefFoundError on RoboSpice -


recently migrated android project eclipse adt android studio, little tricky, project uses robospice (1.4.6) , runs on android api 22 when try run on real device (android api 14) throws noclassdeffounderror exception. here stack:

08-07 18:14:13.392  31254-31254/com.mypackage.myapp e/dalvikvm﹕ not find class 'com.octo.android.robospice.priority.priorityfuture', referenced method com.octo.android.robospice.priority.prioritythreadpoolexecutor.newtaskfor 08-07 18:14:13.393  31254-31254/com.mypackage.myapp e/dalvikvm﹕ not find class 'com.octo.android.robospice.priority.pausablepriorityblockingqueue', referenced method com.octo.android.robospice.priority.pausablethreadpoolexecutor.<init> 08-07 18:14:13.394  31254-31254/com.mypackage.myapp e/dalvikvm﹕ not find class 'com.octo.android.robospice.priority.pausablepriorityblockingqueue', referenced method com.octo.android.robospice.priority.pausablethreadpoolexecutor.<init> 08-07 18:14:13.394  31254-31254/com.mypackage.myapp e/dalvikvm﹕ not find class 'com.octo.android.robospice.priority.pausablepriorityblockingqueue', referenced method com.octo.android.robospice.priority.pausablethreadpoolexecutor.pause 08-07 18:14:13.394  31254-31254/com.mypackage.myapp e/dalvikvm﹕ not find class 'com.octo.android.robospice.priority.pausablepriorityblockingqueue', referenced method com.octo.android.robospice.priority.pausablethreadpoolexecutor.resume 08-07 18:14:13.396  31254-31254/com.mypackage.myapp e/androidruntime﹕ fatal exception: main java.lang.noclassdeffounderror: com.octo.android.robospice.priority.pausablepriorityblockingqueue         @ com.octo.android.robospice.priority.pausablethreadpoolexecutor.<init>(pausablethreadpoolexecutor.java:25)         @ com.octo.android.robospice.priority.prioritythreadpoolexecutor.<init>(prioritythreadpoolexecutor.java:23)         @ com.octo.android.robospice.priority.prioritythreadpoolexecutor.getpriorityexecutor(prioritythreadpoolexecutor.java:35)         @ com.octo.android.robospice.spiceservice.getexecutorservice(spiceservice.java:191)         @ com.octo.android.robospice.spiceservice.oncreate(spiceservice.java:107)         @ com.octo.android.robospice.springandroidspiceservice.oncreate(springandroidspiceservice.java:25)         @ android.app.activitythread.handlecreateservice(activitythread.java:2504)         @ android.app.activitythread.access$1600(activitythread.java:149)         @ android.app.activitythread$h.handlemessage(activitythread.java:1382)         @ android.os.handler.dispatchmessage(handler.java:99)         @ android.os.looper.loop(looper.java:153)         @ android.app.activitythread.main(activitythread.java:4987)         @ java.lang.reflect.method.invokenative(native method)         @ java.lang.reflect.method.invoke(method.java:511)         @ com.android.internal.os.zygoteinit$methodandargscaller.run(zygoteinit.java:821)         @ com.android.internal.os.zygoteinit.main(zygoteinit.java:584)         @ dalvik.system.nativestart.main(native method) 

i think need additional jar dependency searched lot on web but, hope can me.

edit: 11/aug/15

root gradle

buildscript {     repositories {         mavencentral()     }     dependencies {         classpath 'com.android.tools.build:gradle:1.2.3'     } } 

module gradle: i've tried jars (compiling file tree , 1 one) , through maven repo.

apply plugin: 'com.android.application'  dependencies {     compile filetree(dir: 'libs', include: ['*.jar'])     /*compile files('libs/android-support-v4.jar')                 compile files('libs/robospice-1.4.6.jar')                 compile files('libs/robospice-cache-1.4.6.jar')                 compile files('libs/spring-android-core-1.0.1.release.jar')                 compile files('libs/spring-android-rest-template-1.0.1.release.jar')                 compile files('libs/robospice-spring-android-1.4.6.jar')                 compile files('libs/itextg-5.4.4.jar')                 compile files('libs/mpandroidchartlibrary-1-7-0.jar')                 compile files('libs/commons-lang3-3.1.jar')                 compile files('libs/jackson-mapper-asl-1.9.11.jar')                 compile files('libs/jackson-core-asl-1.9.11.jar')                 compile files('libs/gson-2.3.jar')                 compile files('libs/core-2.3.0.jar')                 compile files('libs/ksoap2-android-assembly-3.3.0-jar-with-dependencies.jar')*/     //compile 'com.octo.android.robospice:robospice:1.4.14'     compile project(':module1')     compile project(':module2')     compile project(':module3')     compile project(':module4')     compile project(':module5')     compile project(':module6') }  android {     compilesdkversion 14     buildtoolsversion '22.0.1'     defaultconfig {         // enabling multidex support.         multidexenabled true     }     packagingoptions {         exclude 'meta-inf/dependencies.txt'         exclude 'meta-inf/license.txt'         exclude 'meta-inf/notice.txt'         exclude 'meta-inf/notice'         exclude 'meta-inf/license'         exclude 'meta-inf/dependencies'         exclude 'meta-inf/notice.txt'         exclude 'meta-inf/license.txt'         exclude 'meta-inf/dependencies.txt'         exclude 'meta-inf/lgpl2.1'         exclude 'meta-inf/asl2.0'     }     sourcesets {         main {             manifest.srcfile 'androidmanifest.xml'             java.srcdirs = ['src']             resources.srcdirs = ['src']             aidl.srcdirs = ['src']             renderscript.srcdirs = ['src']             res.srcdirs = ['res']             assets.srcdirs = ['assets']         }         // move tests tests/java, tests/res, etc...         instrumenttest.setroot('tests')          // move build types build-types/<type>         // instance, build-types/debug/java, build-types/debug/androidmanifest.xml, ...         // moves them out of them default location under src/<type>/...         // conflict src/ being used main source set.         // adding new build types or product flavors should accompanied         // similar customization.         debug.setroot('build-types/debug')         release.setroot('build-types/release')     }     productflavors {     } } 

you using robospice-1.4.6.jar in commented section of jars, , possible version did not contain class getting errors about. because of first dependency line compile filetree(dir: 'libs', include: ['*.jar']), every jar file in libs directory going included in classpath.

i suggest considering maven-only dependencies management, removing jars related robospice libs dir , including robospice extension use (seems 'com.octo.android.robospice:robospice-spring-android:1.4.14' case).


Comments

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

mercurial graft feature, can it copy? -