From Google Play Console,
java.lang.RuntimeException
occurs without "Caused by:"
The below log is copied from Google Play Console Crash log.
This is for: Android 8.0, Android 8.1, Android 7.0, Android 7.1
java.lang.RuntimeException:
at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2955)
at android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:3030)
at android.app.ActivityThread.-wrap11 (Unknown Source)
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1696)
at android.os.Handler.dispatchMessage (Handler.java:105)
at android.os.Looper.loop (Looper.java:164)
at android.app.ActivityThread.main (ActivityThread.java:6938)
at java.lang.reflect.Method.invoke (Method.java)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run (Zygote.java:327)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1374)
Please help me regarding this!
ActivityThread.java
says it's updatePendingConfiguration() or registerOnActivityPausedListener(), so it either fails with .onPause()
or it fails to call the super()
method with the correct arguments - or something is wrong with the Configuration
being applied.
I'd glady explain how to solve the issue, but the question lacks the code which throws the exception. The best way to tackle this might be to employ something alike Firebase Crashlytics, so that one can see where exactly this is coming from and which devices are affected (in case this should be specific). I'd almost suspect that it might be caused by starting an Activity
with the application's Context
, while not setting flag Intent.FLAG_ACTIVITY_NEW_TASK
(see: this answer).
For the people saying:
did you resolve this issue? It's a rising crash in my app as well – Bao Le Feb 6 at 8:36
did anybody resolve this issue? – AwaisMajeed Feb 9 at 13:15
Also happening to me. =( – masterlopau Feb 26 at 1:51
do this solved? – Vengat Jul 19 at 5:55
Do YOU have the extra cause log ? It would help enormously.
java.lang.RuntimeException:
at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2955)
at android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:3030)
at android.app.ActivityThread.-wrap11 (Unknown Source)
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1696)
at android.os.Handler.dispatchMessage (Handler.java:105)
at android.os.Looper.loop (Looper.java:164)
at android.app.ActivityThread.main (ActivityThread.java:6938)
at java.lang.reflect.Method.invoke (Method.java)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run (Zygote.java:327)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1374)
java.lang.RuntimeException:
at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2955)
at android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:3030)
at android.app.ActivityThread.-wrap11 (Unknown Source)
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1696)
at android.os.Handler.dispatchMessage (Handler.java:105)
at android.os.Looper.loop (Looper.java:164)
at android.app.ActivityThread.main (ActivityThread.java:6938)
at java.lang.reflect.Method.invoke (Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run (Zygote.java:327)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1374)
This line differs:
at java.lang.reflect.Method.invoke (Method.java)
and:
at java.lang.reflect.Constructor.newInstance0 (Native Method)
Caused by: android.support.v4.app.i$b:
at android.support.v4.app.i.instantiate (Fragment.java:386)
at android.support.v4.app.k.a (FragmentContainer.java:33)
at android.support.v4.app.s.a (FragmentState.java:79)
at android.support.v4.app.o.a (FragmentManager.java:3080)
at android.support.v4.app.l.a (FragmentController.java:152)
at android.support.v4.app.j.onCreate (FragmentActivity.java:330)
at host.exp.exponent.experience.f.onCreate (ReactNativeActivity.java:140)
at host.exp.exponent.experience.a.onCreate (BaseExperienceActivity.java:79)
at host.exp.exponent.experience.ExperienceActivity.onCreate (ExperienceActivity.java:160)
at host.exp.exponent.experience.ShellAppActivity.onCreate (ShellAppActivity.java:22)
at android.app.Activity.performCreate (Activity.java:7174)
at android.app.Instrumentation.callActivityOnCreate (Instrumentation.java:1220)
at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2908)
Caused by: java.lang.reflect.InvocationTargetException:
at java.lang.reflect.Constructor.newInstance0 (Native Method)
at java.lang.reflect.Constructor.newInstance (Constructor.java:334)
at android.support.v4.app.i.instantiate (Fragment.java:364)
Caused by: java.lang.IllegalStateException:
at abi30_0_0.host.exp.exponent.modules.api.screens.Screen$ScreenFragment.<init> (Screen.java:19)
NOTE the at android.support.v4.app
lines.
See Android standalone app randomly crashes on app open
(i) This problem has a miriad of causes from my internet search. A common cause seems to be the use of android.support class packages
, or having a *Compat suffix
. Review you build.gradle
files for android.support.v4
etc...
(ii) Because sometimes it does not occur in testing, only deployment I guess the android.support.v4
etc... use's a problematic device library on some devices or API's.
Note: With the release of
Android 9.0 (API level 28)
there is a new version of the support library called AndroidX which is part of Jetpack. TheAndroidX
library contains the existing support library and also includes the latestJetpack
components.You can continue to use the support library. Historical artifacts (those versioned
27
and earlier, and packaged asandroid.support.*
) will remain available onGoogle Maven
. However, all new library development will occur in theAndroidX
library.We recommend using the AndroidX libraries in all new projects. You should also consider migrating existing projects to
AndroidX
as well. Support Library SetupThe support libraries are now available through
Google's Maven
repository. We no longer support downloading the libraries through theSDK Manager
, and that functionality will be removed soon..Note: After including the Support Library in your application project, we strongly recommend that you shrink, obfuscate, and optimize your app for release. In addition to protecting your source code with obfuscation, shrinking removes unused classes from any libraries you include in your application, which keeps the download size of your application as small as possible.
Note: If you are including several support libraries, the minimum SDK version must be the highest version required by any of the specified libraries. For example, if your app includes both the
v14
Preference
Support library and thev17
Leanback
library, your minimum SDK version must be17
or higher.
See also:
Support Library Packages
features
It is related to react-native-screens and they have workaround for this issue, please have a look at:
Android crashes nondeterministically when restoring from background - veedeo.
From analyzing the log following assumption can be made,
The exception is thrown in any of the external libraries used in the project
Explanation: Basically, the exception is thrown by ActivityThread.java
, more specifically, the performLaunchActivity()
method at line 2955
threw the exception. As the stack trace didn't include any of your application's internal class
, we can assume that the exception is thrown in an external class
that is shipped with a library you are using in your project.
If that is the case, following workarounds can be performed to sort this out -
Look into the issue tracker of the libraries for this issue. For example, Android-Permission library has a closed issue having exactly the same log.
If your project is react native, there is a long discussion about it here
Suggestion: I want to add few more lines with @Martin Zeitler's suggestion of using Crashlytics.
I recommend you to Customize your Firebase Crashlytics crash reports. Because, sometimes only stack trace is not enough to reproduce the crash.
By using the customization feature you will be able to get,
User's identity
State of the app
The Events that were performed before the crash
Which will surely help you regenerate the crash and fix it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With