This is my first android app, with 0 test coverage, and I face difficulties with fixing ANR errors detected in play console. There was an exception on user's phone (Samsung Galaxy S21 5G, Android 11 (SDK 30)), and I have no idea how to analize and fix such errors. There is no binding to my code in trace:
java.lang.RuntimeException:
at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:3792)
at android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:3968)
at android.app.servertransaction.LaunchActivityItem.execute (LaunchActivityItem.java:85)
at android.app.servertransaction.TransactionExecutor.executeCallbacks (TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute (TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:2307)
at android.os.Handler.dispatchMessage (Handler.java:106)
at android.os.Looper.loop (Looper.java:246)
at android.app.ActivityThread.main (ActivityThread.java:8512)
at java.lang.reflect.Method.invoke (Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:602)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1130)
I would like to detect such errors with tests before release, but I do not know what to start with and how to do it correctly.
UPD: somethin like this continue appearing:
java.lang.RuntimeException:
at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:3556)
at android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:3703)
at android.app.ActivityThread.handleRelaunchActivityInner (ActivityThread.java:5669)
at android.app.ActivityThread.handleRelaunchActivity (ActivityThread.java:5577)
at android.app.servertransaction.ActivityRelaunchItem.execute (ActivityRelaunchItem.java:69)
at android.app.servertransaction.TransactionExecutor.executeCallbacks (TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute (TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:2216)
at android.os.Handler.dispatchMessage (Handler.java:107)
at android.os.Looper.loop (Looper.java:237)
at android.app.ActivityThread.main (ActivityThread.java:7948)
at java.lang.reflect.Method.invoke (Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1075)
It seems that there is some other exception, but the exception message is not delivered because of another error: https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/app/ActivityThread.java#3556