question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

NoClassDefFoundError in android 4.4?

See original GitHub issue

I’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:closed
  • Created 7 years ago
  • Comments:7

github_iconTop GitHub Comments

3reactions
VerachadWcommented, Jun 2, 2017

One possible solution is Disable Instant Run. This is work for me.

0reactions
andriipanasiukcommented, Jan 25, 2018

I had the same issue if I used classpath 'com.android.tools.build:gradle:3.1.0-alpha08' in my project’s build.gradle. After I updated it to classpath 'com.android.tools.build:gradle:3.1.0-alpha09' the issue was fixed.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found