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

Splash Stays on the screen

Open pranjalkhandelwal432 opened this issue 2 years ago • 14 comments

Splash stays on the screen i.e it doesn't let the component render

Started happening only after the version upgrade of react-native from 63 to 68

Version:

"react-native-splash-screen": "^3.2.0",
"react-native": "^0.68.1",

Specifically happening on Android

Activity

    override fun onCreate(savedInstanceState: Bundle?) {
        SplashScreen.show(this,true)
        super.onCreate(savedInstanceState)
 }

Index.js

componentDidMount(){

    SplashScreen.hide()
 
}

pranjalkhandelwal432 avatar May 13 '22 06:05 pranjalkhandelwal432

Put [RNSplashScreen show]; at the end right before return YES;

lifwanian avatar May 13 '22 17:05 lifwanian

same here, just started happening this morning, and it was working fine before now.

vic2tee4u avatar May 13 '22 20:05 vic2tee4u

Put [RNSplashScreen show]; at the end right before return YES;

On iOS it helped. For us, it this show line was few lines above, then app never started, when it was absolutely the last line, then it opened.

rogerkerse avatar May 18 '22 08:05 rogerkerse

Put [RNSplashScreen show]; at the end right before return YES;

Yup, that did it for me as well!

ilyakar avatar Jun 28 '22 12:06 ilyakar

Put [RNSplashScreen show]; at the end right before return YES;

@lifwanian I have the exact same issue on android release varient, debug works fine. where to find "return YES;" ? not sure where to add the line "[RNSplashScreen show];"

Zontex avatar Jul 10 '22 11:07 Zontex

Put [RNSplashScreen show]; at the end right before return YES;

@ilyakar Where Should I Put the above line ?

dnayak696 avatar Aug 02 '22 07:08 dnayak696

any update on that? it happens to me on android release mode, debug mode works fine. "react-native": "0.67.2" "react-native-splash-screen": "^3.3.0"

ofri-7chairs avatar Aug 03 '22 08:08 ofri-7chairs

Is index.js the correct place to put the hide method?

Mine is in my App.tsx, perhaps try your app.js/tsx file , I also just used a useEffect useEffect(() => { SplashScreen.hide(); },[]);

dotavi avatar Sep 03 '22 08:09 dotavi

same issue on android

dibyopra avatar Sep 12 '22 09:09 dibyopra

same here

"react-native": "0.66.2",
"react-native-splash-screen": "^3.3.0"

yahacom avatar Oct 07 '22 12:10 yahacom

/////#### I got mine fixed by reverting the changes, so yeah upgrading gradle wasn't a good idea ####//////

same issue: works fine in debugBuild(only when connected to Debug server host) and stuck on splash in ReleaseBuild

"react-native": "0.66.5",

buildscript {
    ext {
        buildToolsVersion = "31.0.0"
        minSdkVersion = 21
        compileSdkVersion = 31
        targetSdkVersion = 31
        ndkVersion = "21.4.7075529"
        """""edit, I commented this kotlin_version still stcuks on splash screen"""""
        // kotlin_version = '1.6.10'
    }
    repositories {
        google()
        mavenCentral()
    }
    dependencies {
        // classpath("com.android.tools.build:gradle:4.2.2")
        classpath("com.android.tools.build:gradle:7.1.1")
        // classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version")
        classpath('com.google.gms:google-services:4.3.14')
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

and my gradle distributionUrl=https://services.gradle.org/distributions/gradle-7.3.3-all.zip

it was working fine before these changes reasons might be

i upgraded my gradle from 6.9 to 7.3.3 a week ago

and ### did the following changes too: see in picture

image

engrwaqasali avatar Nov 15 '22 08:11 engrwaqasali

Has anyone encountered the same problem as me This phenomenon is likely to occur on miui Android devices, and only in release versions Difficulty in debugging and inability to locate issues

sxsx2yzyz avatar Sep 05 '23 03:09 sxsx2yzyz

I added [RNSplashScreen show]; just before the return YES.

I called the SplashScreen.hide(); in the react-native code.

But the app is not even starting, so it is not able to read the SplashScreen.hide();.

It's completely stuck when the splash appears.

Any Solution?.

JoseVov avatar Apr 12 '24 15:04 JoseVov

solved here -> https://github.com/crazycodeboy/react-native-splash-screen/issues/637

JoseVov avatar Apr 12 '24 15:04 JoseVov