Recently our app have logged multiple crashes at Google Play Console, that happens with various devices but ONLY on those with android 8.1 (SDK 27).
Stack trace for this crash looked like this:
java.lang.RuntimeException: at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:3006) at android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:3084) at android.app.ActivityThread.-wrap11 (Unknown Source) at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1781) at android.os.Handler.dispatchMessage (Handler.java:106) at android.os.Looper.loop (Looper.java:210) at android.app.ActivityThread.main (ActivityThread.java:7080) at java.lang.reflect.Method.invoke (Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:523) at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:863) at .CPU at .26 at .14 at .13 How do use this limited info for tracing the root cause of the problem, since that none of the line referring to the code from the app? Is there any method to reproduce this? Emulator using SDK 27 didnt catch the errors.
Note: App in question is developed using Java on android studio
1 Answer
With your exception message, RuntimeException with Unknown Source occurs when the method can not be found by reflection.
In my experiences, this problem usually cause on third-party sdk, some method it called maybe was obsoleted on specified Android version or not support on specified device (such as Mi、Samsung .. etc).
Here are some advices for you, hope them helps.
- Check the crash reports to find out other common points (e.g. mobile manufacturer), it would be helpful.
- Try upgrade most of your dependencies to the latest version
- Try search this exception with your dependencies.