React-native-splash-screen: Cannot read property 'hide' of null

Created on 15 May 2020  路  5Comments  路  Source: crazycodeboy/react-native-splash-screen

Hi guys, I followed the readme:

  • Install package

  • add Oncreate

  • create launch_screen.xml

  • call SplashScreen.hide() in componentDidMount

But I receive this error:

Cannot read property 'hide' of null

suggestions ?

Im trying implements in open source project Jitsi-meet.

Most helpful comment

@sheywesk I have the same issue. Could you please share your solution?

in jitsi-meet ?
you need add
new org.devio.rn.splashscreen.SplashScreenReactPackage()

in
android/sdk/src/main/java/org/jitsi/meet/sdk/ReactInstanceManagerHolder.java

result

private static List<NativeModule> createNativeModules(ReactApplicationContext reactContext) {
      [...]
      new org.devio.rn.splashscreen.SplashScreenReactPackage()`
      [...]
 }

All 5 comments

Resolved !

@sheywesk I have the same issue. Could you please share your solution?

@sheywesk I have the same issue. Could you please share your solution?

in jitsi-meet ?
you need add
new org.devio.rn.splashscreen.SplashScreenReactPackage()

in
android/sdk/src/main/java/org/jitsi/meet/sdk/ReactInstanceManagerHolder.java

result

private static List<NativeModule> createNativeModules(ReactApplicationContext reactContext) {
      [...]
      new org.devio.rn.splashscreen.SplashScreenReactPackage()`
      [...]
 }

@sheywesk thanks for prompting. Yep, it's jitsi-meet. But I had to add new org.devio.rn.splashscreen.SplashScreenModule(reactContext) to make it work. Anyway, you've saved me a lot of time!

@herasymchuk @sheywesk Thanks guys for the resolution.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

zhaogao picture zhaogao  路  4Comments

mharrisweb picture mharrisweb  路  3Comments

johndo31 picture johndo31  路  3Comments

zxyah picture zxyah  路  4Comments

js1121302139 picture js1121302139  路  5Comments