crazycodeboy / react-native-splash-screen

A splash screen for react-native, hide when application loaded ,it works on iOS and Android.
MIT License
5.61k stars 1.09k forks source link

Crashing Splash Screen on Android with react native version 0.59.9 #399

Open NweThazin opened 5 years ago

NweThazin commented 5 years ago

Run react-native info in your project and share the content.

2019-06-19 18:19:07.232 12248-12248/sg.com.srx E/WindowManager: android.view.WindowLeaked: Activity sg.com.srx.MainActivity has leaked window DecorView@bca8668[] that was originally added here at android.view.ViewRootImpl.(ViewRootImpl.java:615) at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:365) at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:100) at android.app.Dialog.show(Dialog.java:420) at org.devio.rn.splashscreen.SplashScreen$1.run(SplashScreen.java:36) at android.app.Activity.runOnUiThread(Activity.java:6281) at org.devio.rn.splashscreen.SplashScreen.show(SplashScreen.java:27) at org.devio.rn.splashscreen.SplashScreen.show(SplashScreen.java:49) at sg.com.srx.MainActivity.onCreate(MainActivity.java:15) at android.app.Activity.performCreate(Activity.java:7183) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1220) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2910) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3032) at android.app.ActivityThread.-wrap11(Unknown Source:0) 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:6944) 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)

What platform does your issue occur on? (Android/iOS/Both) - Android react native version : 0.59.9 "react-native-splash-screen": "^3.2.0",

Describe your issue as precisely as possible : 1) Steps to reproduce the issue or to explain in which case you get the issue 2) Interesting logs

Join a screenshot or video of the problem on the simulator or device?

Show us the code you are using?

liganghui commented 5 years ago

Hi . My project is the same as your version. When there is no problem, it is recommended to check it yourself.

cielojrdev commented 5 years ago

got this crash on "react": "16.6.3", "react-native": "0.58.6"

Android only issue, ios is ok

liganghui commented 5 years ago

got this crash on "react": "16.6.3", "react-native": "0.58.6"

Android only issue, ios is ok

My "react-native": "0.59.9 "react": "16.8.3" , android is ok

cielojrdev commented 5 years ago

got this crash on "react": "16.6.3", "react-native": "0.58.6" Android only issue, ios is ok

My "react-native": "0.59.9 "react": "16.8.3" , android is ok

sorry my bad, i run it without the xmls created yet, it's working ok.

janroures commented 5 years ago

@cielojrdev I'm facing this same issue, what did you do to fix it?

EnKrypt commented 5 years ago

@janroures You have to follow the README through to the end.

If you change MainActivity.java, you also have to create the xml files, as suggested in the next section of the README. I assume that's what @cielojrdev was talking about.

buddhiv commented 5 years ago

refer to this. might help. #167

tangxunhu commented 5 years ago

I try this: minSdkVersion = 20 You can try >= 20

Prosquid1 commented 4 years ago

In my case, I had an issue with loading native C libraries. There might be another issue entirely with your project, react-native-splash-screen takes the blame because it's the first library that calls the UI/Activity.

If your Logcat stacktrace shows any crash before react-native-splash-screen, then this library might not be your issue.