[Android] App Crash when use (split-screen, multi-window, popup-window) feature on android5+
App crash when try to use (split-screen, multi-window, popup-window) feature on android5+ However, I disable this feature on androidManifest.xml but It does not fix this crash.
- react: 16.1.1
- react-native: 0.49.5
- react-native-navigation: 1.1.281
In my opinion, Maybe activity try to resume app but don't found something to display or lose something before that I have no idea how to fix it out.
Logcat allow split screen
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2817)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2892)
at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:4754)
at android.app.ActivityThread.-wrap18(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1599)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6541)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'android.os.Bundle android.os.Bundle.getBundle(java.lang.String)' on a null object reference
at com.reactnativenavigation.params.AppStyle.setAppStyle(AppStyle.java:11)
at com.reactnativenavigation.params.parsers.ActivityParamsParser.parse(ActivityParamsParser.java:14)
at com.reactnativenavigation.controllers.NavigationCommandsHandler.parseActivityParams(NavigationCommandsHandler.java:32)
at com.reactnativenavigation.controllers.NavigationActivity.onCreate(NavigationActivity.java:72)
at android.app.Activity.performCreate(Activity.java:6975)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1213)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2770)
... 10 more
disable split screen on androidManifest.xml
android.view.WindowLeaked: Activity com.reactnativenavigation.controllers.NavigationActivity has leaked window DecorView@8603df1[] that was originally added here
at android.view.ViewRootImpl.<init>(ViewRootImpl.java:485)
at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:346)
at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:92)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3734)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2898)
at android.app.ActivityThread.-wrap11(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1593)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6541)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
Any workaround? I have the same error but without using split-screen, multi-window, popup-window, etc. It just crashes all of a sudden.
Android emulator API 22. react-native 0.52 (wasn't happening on 0.49.5)
Fix for WindowLeaked was mentioned at this issue
Add this method:
@Override
protected void onPause() {
SplashScreen.hide(this);
super.onPause();
}
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you believe the issue is still relevant, please test on the latest version and report back. Thank you for your contributions.
The issue has been closed for inactivity.