react-native-splash-screen
react-native-splash-screen copied to clipboard
App stop at native splash screen, not go to react native screen
Before i add react-native-splash-screen, my app run ok. When i add react-native-splash-screen, my app open splah screeen on native, and stop there, not go to react native first screen.
I have the same error, app crashed
Move the 'layout' folder to the 'res folder ('app/src/main/res/layout').
Same issue, sometimes the splash screen not dissapear. de layout file is on 'app/src/main/res/layout
+1
I have the same error
In my case I was doing the steps incorrectly, try to repeat the installation more carefully. It worked out for me: D
RN 0.58.3
@ChauVV is this issue resolved ? if it is please let us know what you did wrong and close it
after run with android studio, problem solved
OP does not specify environment or provide enough information to debug.
componentDidMount() { SplashScreen.hide(); } add this code in App.js this works for me.
Make sure your MainActivity.java contains the following 2
package com.app_name; //Your app name
import com.facebook.react.ReactActivity; import org.devio.rn.splashscreen.SplashScreen; import android.os.Bundle; // import this
public class MainActivity extends ReactActivity { @Override protected void onCreate(Bundle savedInstanceState) { SplashScreen.show(this); // here super.onCreate(savedInstanceState); } @Override protected String getMainComponentName() { return "Appname"; //your Appname } }
I forgot to add the last "@Override" resulting in the react native part not being called and hence the app kept showing splash screen
I have this issue but only on iOS, on Android is working well.
even I am facing the same issue with iOS, android everything goes fine. @juandigombr did u find any solution for this?
Solution is render() { SplashScreen.hide();
@gokulkulkarni1987 Sorry. I didn't find a solution. I just designed an splashscreen in xcode and used that instead of react-native-splash-screen
I'm also facing this issue on iOS only, the splash screen doesn't hide when the method is called from JS. I have some async methods, after which the splash screen needs to hide. the logs show that the async methods are called successfully. but the splash screen hide method doesn't hide it.
Add SplashScreen.hide(); in componentDidMount method of your root component like App.js. Work done.
Guys check for following
-
launch_screen.xml is the name of xml that is added in the layout folder (name matters)
-
Layout folder is present in the app\src\main\res\
-
Make shur u linked react-native-splash-screen else use
npx react-native link react-native-splash-screen
-
Don't forget to add
<color name="primary_dark">#0191FE</color>
in colors.xml present in \app\src\main\res\values