NoClassDefFoundError in android 4.4?
See original GitHub issueI’m getting a NoClassDefFoundError when initializing the library in Application#onCreate
The stacktrace I’m getting is:
java.lang.NoClassDefFoundError: org.threeten.bp.zone.TzdbZoneRulesProvider
at com.jakewharton.threetenabp.AndroidThreeTen.init(AndroidThreeTen.java:28)
at com.jakewharton.threetenabp.AndroidThreeTen.init(AndroidThreeTen.java:16)
at com.crumbit.crumbitapp.App.onCreate(App.java:99)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1007)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4344)
at android.app.ActivityThread.access$1500(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5017)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
at dalvik.system.NativeStart.main(Native Method)
I’m trying to find out why, but meanwhile I have a clue I’m just opening this to see if somebody else has a clue on that, guess that mostly has to do with build process.
Issue Analytics
- State:
- Created 7 years ago
- Comments:7
Top Results From Across the Web
Android NoClassDefFoundError on android 4.4.2
When I try to run my app on Android 4.4.2 it is giving me this error: E/AndroidRuntime: FATAL EXCEPTION: main Process: my.package, ...
Read more >NoClassDefFoundError in android 4.4 even with multidex ...
Based on the stacktrace it's either failing to load AssetsZoneRulesInitializer from this library or ZoneRulesInitializer from ThreeTenBP. A ...
Read more >Multidex Cause Java.Lang.Noclassdeffounderror In Android 4.4
If any class that's required during startup is not provided in the primary DEX file then your app crashes with the error java.lang.NoClassDefFoundError....
Read more >NoClassDefFoundError - Android Developers
NoClassDefFoundError(). Constructs a NoClassDefFoundError with no detail message. NoClassDefFoundError(String s). Constructs a NoClassDefFoundError with the ...
Read more >Android 4.4.4 java.lang.NoClassDefFoundError - 码农教程
Android 4.4.4 java.lang.NoClassDefFoundError · 出现这种原因是因为Android规定方法的数量不能超过65,536,它代表的是单个Dalvik 字节码文件内的代码可 ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

One possible solution is Disable Instant Run. This is work for me.
I had the same issue if I used
classpath 'com.android.tools.build:gradle:3.1.0-alpha08'in my project’sbuild.gradle. After I updated it toclasspath 'com.android.tools.build:gradle:3.1.0-alpha09'the issue was fixed.