App crashes with 'NoClassDefFoundError' only on Android 4.x -


i getting series of type or error while running project: https://github.com/evercam/evercam-play-android on lower android versions (tested on htc 1 x - 4.1.1 && galaxy s3 - 4.3 simulators , both crashes). works on android 5.

seems of crashes happening when creating runnable object, couldn't figure out reason. i've resolved few other similar crashes removing runnables new error come up.

any idea going wrong here? lot!

i using android studio 1.3 , here logs latest error:

08-05 05:28:51.071    3080-3080/? e/dalvikvm﹕ not find class 'io.evercam.androidapp.custom.cameralayout$3', referenced method io.evercam.androidapp.custom.cameralayout.<init> 08-05 05:28:51.071    3080-3080/? w/dalvikvm﹕ vfy: unable resolve new-instance 6631 (lio/evercam/androidapp/custom/cameralayout$3;) in lio/evercam/androidapp/custom/cameralayout; 08-05 05:28:51.071    3080-3080/? d/dalvikvm﹕ vfy: replacing opcode 0x22 @ 0x0019 08-05 05:28:51.071    3080-3080/? w/dalvikvm﹕ vfy: unable find class referenced in signature (lio/evercam/androidapp/custom/gradienttitlelayout;) 08-05 05:28:51.071    3080-3080/? e/dalvikvm﹕ not find class 'io.evercam.androidapp.custom.cameralayout$2', referenced method io.evercam.androidapp.custom.cameralayout.showofflineicon 08-05 05:28:51.071    3080-3080/? w/dalvikvm﹕ vfy: unable resolve new-instance 6630 (lio/evercam/androidapp/custom/cameralayout$2;) in lio/evercam/androidapp/custom/cameralayout; 08-05 05:28:51.071    3080-3080/? d/dalvikvm﹕ vfy: replacing opcode 0x22 @ 0x0005 08-05 05:28:51.071    3080-3080/? i/dalvikvm﹕ not find method io.evercam.androidapp.custom.gradienttitlelayout.getofflineimageview, referenced method io.evercam.androidapp.custom.cameralayout.getofflineiconbounds 08-05 05:28:51.071    3080-3080/? w/dalvikvm﹕ vfy: unable resolve virtual method 44814: lio/evercam/androidapp/custom/gradienttitlelayout;.getofflineimageview ()landroid/widget/imageview; 08-05 05:28:51.071    3080-3080/? d/dalvikvm﹕ vfy: replacing opcode 0x6e @ 0x0007 08-05 05:28:51.075    3080-3080/? i/dalvikvm﹕ not find method io.evercam.androidapp.custom.gradienttitlelayout.removegradientshadow, referenced method io.evercam.androidapp.custom.cameralayout.showthumbnail 08-05 05:28:51.075    3080-3080/? w/dalvikvm﹕ vfy: unable resolve virtual method 44815: lio/evercam/androidapp/custom/gradienttitlelayout;.removegradientshadow ()v 08-05 05:28:51.075    3080-3080/? d/dalvikvm﹕ vfy: replacing opcode 0x6e @ 0x0057 08-05 05:28:51.075    3080-3080/? i/dalvikvm﹕ not find method io.evercam.androidapp.custom.gradienttitlelayout.settitle, referenced method io.evercam.androidapp.custom.cameralayout.updatetitleifdifferent 08-05 05:28:51.075    3080-3080/? w/dalvikvm﹕ vfy: unable resolve virtual method 44816: lio/evercam/androidapp/custom/gradienttitlelayout;.settitle (ljava/lang/string;)v 08-05 05:28:51.075    3080-3080/? d/dalvikvm﹕ vfy: replacing opcode 0x6e @ 0x0028 08-05 05:28:51.075    3080-3080/? d/dalvikvm﹕ dexopt: unable opt direct call 0xaeaa @ 0x1b in lio/evercam/androidapp/custom/cameralayout;.<init> 08-05 05:28:51.075    3080-3080/? d/dalvikvm﹕ dexopt: unable opt direct call 0xaf0d @ 0xdf in lio/evercam/androidapp/custom/cameralayout;.<init> 08-05 05:28:51.075    3080-3080/? d/dalvikvm﹕ dexopt: unable opt direct call 0xaea8 @ 0x105 in lio/evercam/androidapp/custom/cameralayout;.<init> 08-05 05:28:51.075    3080-3080/? d/dalvikvm﹕ dexopt: unable opt direct call 0xaea9 @ 0x07 in lio/evercam/androidapp/custom/cameralayout;.showofflineicon 08-05 05:28:51.075    3080-3080/? d/androidruntime﹕ shutting down vm 08-05 05:28:51.075    3080-3080/? w/dalvikvm﹕ threadid=1: thread exiting uncaught exception (group=0xa4b68648) 08-05 05:28:52.767    3080-3104/io.evercam.androidapp d/dalvikvm﹕ gc_for_alloc freed 778k, 7% free 12359k/13164k, paused 7ms, total 7ms 08-05 05:28:54.083    3080-3080/io.evercam.androidapp e/androidruntime﹕ fatal exception: main     java.lang.noclassdeffounderror: io.evercam.androidapp.custom.cameralayout$3             @ io.evercam.androidapp.custom.cameralayout.<init>(cameralayout.java:256)             @ io.evercam.androidapp.camerasactivity.addallcameraviews(camerasactivity.java:439)             @ io.evercam.androidapp.camerasactivity$1.run(camerasactivity.java:123)             @ android.os.handler.handlecallback(handler.java:730)             @ android.os.handler.dispatchmessage(handler.java:92)             @ android.os.looper.loop(looper.java:137)             @ android.app.activitythread.main(activitythread.java:5103)             @ java.lang.reflect.method.invokenative(native method)             @ java.lang.reflect.method.invoke(method.java:525)             @ com.android.internal.os.zygoteinit$methodandargscaller.run(zygoteinit.java:737)             @ com.android.internal.os.zygoteinit.main(zygoteinit.java:553)             @ dalvik.system.nativestart.main(native method) 08-05 05:31:12.083    3080-3080/? i/process﹕ sending signal. pid: 3080 sig: 9 

the reason didn't implement multidex completely, it's same problem noclassdeffounderror android studio on android 4

after setting multidexenabled = true in defaultconfig, there more changes need made:

  1. include compile 'com.android.support:multidex:1.0.1' in build.gradle
  2. make application class extend multidexapplication instead of application.

Comments

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -