java.lang.NoClassDefFoundError in API 18
See original GitHub issueWhen trying to upload the debug variant of an app I am developing using Timber. When trying in one of my old devices running API 18, I get the following error
E/AndroidRuntime: FATAL EXCEPTION: main
java.lang.NoClassDefFoundError: timber.log.Timber$1
at timber.log.Timber.<clinit>(Timber.java:150)
at com.aitorvs.android.nlcommute.MyApplication.onCreate(MyApplication.java:36)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1007)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4444)
at android.app.ActivityThread.access$1300(ActivityThread.java:141)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1316)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5103)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
at dalvik.system.NativeStart.main(Native Method)
and MyApplication.java:36
is the Timber.plant(...)
inside the true IF branch like bellow:
if (BuildConfig.DEBUG) {
Timber.plant(new Timber.DebugTree() {
@Override
protected String createStackElementTag(StackTraceElement element) {
return super.createStackElementTag(element) + ":" + element.getLineNumber();
}
}
);
} else {
Timber.plant(new TimberReleaseTree());
}
I have tested the app in other devices running L and M and runs OK for both release and debug versions so I assume is something related to TImber internals.
I am using version Timber 4.1.0.
Issue Analytics
- State:
- Created 8 years ago
- Reactions:1
- Comments:7
Top Results From Across the Web
How can I solve "java.lang.NoClassDefFoundError"?
NoClassDefFoundError means that the class is present in the classpath at Compile time , but it doesn' ...
Read more >3 ways to solve java.lang.NoClassDefFoundError in Java J2EE
NoClassDefFoundError in Java comes when Java Virtual Machine is not able to find a particular class at runtime which was available at compile...
Read more >NoClassDefFoundError (Java Platform SE 8 )
Constructs a NoClassDefFoundError with the specified detail message. Method Summary. Methods inherited from class java.lang.Throwable · addSuppressed, ...
Read more >"java.lang.NoClassDefFoundError: org/junit/platform/commons ...
I recently upgraded JUnit version from 5.5.2 to 5.7.0.
Read more >java.lang.NoClassDefFoundError: javax/xml/bind ...
The JAXB is part of Java 6, 7, and 8. · Java 9 deprecated the Java EE modules, including the JAXB packages javax....
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
I have mulitdexing enabled and I am still running in to this issue
@Binghammer I was facing the same issue on KitKat, placing “MultiDex.install(this)” right below super.OnCreate fixed this issue