react-native-splash-screen icon indicating copy to clipboard operation
react-native-splash-screen copied to clipboard

App stop at native splash screen, not go to react native screen

Open ChauVV opened this issue 5 years ago • 18 comments

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.

ChauVV avatar Jan 14 '19 02:01 ChauVV

I have the same error, app crashed

pmtu95 avatar Jan 18 '19 05:01 pmtu95

Move the 'layout' folder to the 'res folder ('app/src/main/res/layout').

izadmehr avatar Jan 20 '19 11:01 izadmehr

Same issue, sometimes the splash screen not dissapear. de layout file is on 'app/src/main/res/layout

kayzenkayzen avatar Jan 22 '19 14:01 kayzenkayzen

+1

thebylito avatar Jan 26 '19 03:01 thebylito

I have the same error

JoaoVitorViana avatar Feb 04 '19 19:02 JoaoVitorViana

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

thebylito avatar Feb 04 '19 20:02 thebylito

@ChauVV is this issue resolved ? if it is please let us know what you did wrong and close it

ishigamii avatar Feb 08 '19 08:02 ishigamii

after run with android studio, problem solved

JoaoVitorViana avatar Feb 11 '19 12:02 JoaoVitorViana

OP does not specify environment or provide enough information to debug.

Kielan avatar Feb 14 '19 17:02 Kielan

componentDidMount() { SplashScreen.hide(); } add this code in App.js this works for me.

erking1998 avatar Feb 21 '19 13:02 erking1998

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

Maskedman99 avatar Mar 21 '19 22:03 Maskedman99

I have this issue but only on iOS, on Android is working well.

juandiegombr avatar May 09 '19 15:05 juandiegombr

even I am facing the same issue with iOS, android everything goes fine. @juandigombr did u find any solution for this?

gokulkulkarni1987 avatar May 20 '19 07:05 gokulkulkarni1987

Solution is render() { SplashScreen.hide();

devilabhi avatar Aug 27 '19 09:08 devilabhi

@gokulkulkarni1987 Sorry. I didn't find a solution. I just designed an splashscreen in xcode and used that instead of react-native-splash-screen

juandiegombr avatar Aug 27 '19 09:08 juandiegombr

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.

ShaharyarMaroof avatar Nov 06 '19 12:11 ShaharyarMaroof

Add SplashScreen.hide(); in componentDidMount method of your root component like App.js. Work done.

anupsamanta avatar Jan 31 '20 19:01 anupsamanta

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

rohit-dasamantharao avatar Nov 19 '21 20:11 rohit-dasamantharao