I know, similar questions have been asked, but I think, my situation is different. Please don't delete.
I've started getting NoClassDefFoundError error after migrating to API 28, just like many other folks. I've seen others experienced this issue because Google has deprecated org.apache classes, which required changing manifest, but I don't use apache classes in my project.
What makes investigation difficult is that there is no custom classes in the stack trace below, and it's not even clear what class was not found. The worst part of it is that I can't reproduce the bug in an emulator, or on a real device, and could see it only in Google Play Store reports, which showed that all crashes have happened on Android 9 devices.
I've two questions about it:
- Does the fact that there is no custom classes in stack trace mean that that's an internal Google problem and I can't really fix it?
- How can I change my project to get more information, e.g. to see what class was not found?
On unrelated note, I think, maintaining newer Android's versions become very difficult and their support simply doesn't exist, so stackoverflow is my last hope.
java.lang.NoClassDefFoundError:
at com.google.android.a.a.m.d (m.java:266)
at com.google.android.a.a.m.a (m.java:113)
at com.google.android.a.a.g.a (g.java:206)
at com.google.android.a.a.g.a (g.java:166)
at com.google.android.a.a.e$a$2.run (e.java:242)
at android.os.Handler.handleCallback (Handler.java:873)
at android.os.Handler.dispatchMessage (Handler.java:99)
at android.os.Looper.loop (Looper.java:214)
at android.os.HandlerThread.run (HandlerThread.java:65)
Caused by: java.lang.ClassNotFoundException:
at dalvik.system.BaseDexClassLoader.findClass (BaseDexClassLoader.java:134)
at java.lang.ClassLoader.loadClass (ClassLoader.java:379)
at java.lang.ClassLoader.loadClass (ClassLoader.java:312)
at com.google.android.a.a.m.d (m.java:266)
at com.google.android.a.a.m.a (m.java:113)
at com.google.android.a.a.g.a (g.java:206)
at com.google.android.a.a.g.a (g.java:166)
at com.google.android.a.a.e$a$2.run (e.java:242)
at android.os.Handler.handleCallback (Handler.java:873)
at android.os.Handler.dispatchMessage (Handler.java:99)
at android.os.Looper.loop (Looper.java:214)
at android.os.HandlerThread.run (HandlerThread.java:65)
Below are also all dependencies that I use in this project:
dependencies {
implementation fileTree(include: ['*.aar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.android.support:customtabs:28.0.0'
implementation 'com.android.support:animated-vector-drawable:28.0.0'
implementation 'com.android.support:mediarouter-v7:28.0.0'
implementation 'com.android.support:recyclerview-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
implementation 'com.android.support:design:28.0.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.google.android.gms:play-services-vision:15.0.1'
implementation 'com.android.support:multidex:1.0.3'
implementation 'com.google.android.gms:play-services-ads:15.0.1'
implementation 'com.google.android.gms:play-services-drive:15.0.1'
implementation 'com.google.android.gms:play-services-auth:15.0.1'
implementation 'com.android.support:cardview-v7:28.0.0'
implementation 'com.google.code.gson:gson:2.8.0'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.google.android.gms:play-services-wearable:15.0.1'
implementation 'com.google.android.gms:play-services-tasks:15.0.1'
implementation files('libs/accessory-v2.5.3.jar')
implementation files('libs/sdk-v1.0.0.jar')
implementation files('libs/lvl.aar')
}
It's a Kotlin project, and Kotlin version is 1.3.10
Update: Recompiled the same code with API 27, posted the app to Play Store again, and didn't see any crashes since then, so it's definitely specific to API 28.