React-native-splash-screen: There is a native module SplashScreen error

Created on 2 Sep 2019  路  5Comments  路  Source: crazycodeboy/react-native-splash-screen

Follow the steps to configure, there is an error.
react-native: 0.60.4
img_20190902(1)

Most helpful comment

I solved it.
The steps to update MainApplication.java are not required, you should delete the import.

All 5 comments

I solved it.
The steps to update MainApplication.java are not required, you should delete the import.

Could you specify which import you deleted ?

You don't need to delete the import, you can add the splashscreen setting in react-native-config.js.

in your react-native.config.js add
module.exports = { dependencies: { 'react-native-splash-screen': { platforms: { ios: null, android: null, }, }, } }

Then check MainApplication.java. If there is any duplicate entry for rn splash screen remove it.

Not sure if this was already solved, but when I got that same error I solved it by removing the packages.add(new SplashScreenReactPackage()); from MainApplication.java
Hope this helps if there was yet no solution to this problem!

Was this page helpful?
0 / 5 - 0 ratings