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

Cannot read property 'hide' of null

Open sheywesk opened this issue 6 years ago • 5 comments

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.

sheywesk avatar May 15 '20 18:05 sheywesk

Resolved !

sheywesk avatar May 15 '20 21:05 sheywesk

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

herasymchuk avatar May 21 '20 11:05 herasymchuk

@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 avatar May 21 '20 13:05 sheywesk

@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 avatar May 21 '20 16:05 herasymchuk

@herasymchuk @sheywesk Thanks guys for the resolution.

rachits21 avatar Aug 26 '20 09:08 rachits21