Intro
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.
This is your Crash log:
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)
Compare with this Crash log (identical line numbers and code flow):
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)
with the extra cause log:
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
Fixes
android.support class packages, or have a *Compat suffix
(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. The AndroidX
library contains the existing support library
and also includes the latest Jetpack
components.
You can continue to use the support library. Historical artifacts
(those versioned 27
and earlier, and packaged as android.support.*
)
will remain available on Google Maven
. However, all new library
development will occur in the AndroidX
library.
We recommend using the AndroidX libraries in all new projects. You
should also consider migrating existing projects to AndroidX
as well.
Support Library Setup
The support libraries are now available through Google's Maven
repository. We no longer support downloading the libraries through the
SDK 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 the v17
Leanback
library, your minimum SDK version
must be 17
or higher.
See also:
Support Library Packages
features
(2) react-native-screens
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.
`... not sure what it's referring to as `
`... Any activities/XML that mention that tag? – Nero Dec 31 '18 at 11:58