Crash logged 'java.lang.RuntimeException' that only happens in android 8.1 (API 27), stack trace is not pointing to our code, how to debug?

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 MiSamsung .. etc).

Here are some advices for you, hope them helps.

  1. Check the crash reports to find out other common points (e.g. mobile manufacturer), it would be helpful.
  2. Try upgrade most of your dependencies to the latest version
  3. Try search this exception with your dependencies.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

You Might Also Like