Error text
java.lang.ClassNotFoundException: Didn't find class "com.example.Foo" on path: DexPathList java.lang.NoSuchMethodError: No virtual method bar()V in class Lcom/example/Foo;
java.lang.ClassNotFoundException: Didn't find class "com.example.Foo" on path: DexPathList java.lang.NoSuchMethodError: No virtual method bar()V in class Lcom/example/Foo;
A class or method is missing at runtime. Usually R8 removed code, a library exists in two versions, or multidex is misconfigured.
adb logcat -b crash.-keep rule.-keep.dependencies to see whether one library exists in two versions.retrace with mapping.txt.adb logcat -b crash
./gradlew :app:dependencies --configuration releaseRuntimeClasspath
# proguard-rules.pro
-keep class com.example.Foo { *; }
retrace mapping.txt trace.txtIf you use reflection, test the release APK every time.
Author and license: Nibras Code