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

Native module SplashScreen tried to override SplashScreenModule. Check the getPackages() method in MainApplication.java.

Open arslanalidev opened this issue 3 years ago • 5 comments

Run react-native info in your project and share the content. System: OS: Windows 10 10.0.19042 CPU: (8) x64 Intel(R) Core(TM) i5-10210U CPU @ 1.60GHz Memory: 1.40 GB / 15.84 GB Binaries: Node: 12.13.0 - C:\Program Files\nodejs\node.EXE Yarn: 1.22.4 - C:\Program Files (x86)\Yarn\bin\yarn.CMD npm: 6.12.0 - C:\Program Files\nodejs\npm.CMD Watchman: Not Found SDKs: Android SDK: Not Found Windows SDK: Not Found IDEs: Android Studio: Version 4.1.0.0 AI-201.8743.12.41.7042882 Visual Studio: Not Found Languages: Java: Not Found Python: Not Found npmPackages: @react-native-community/cli: Not Found react: 16.13.1 => 16.13.1 react-native: 0.63.4 => 0.63.4 react-native-windows: Not Found npmGlobalPackages: react-native: Not Found

What react-native-splash-screen version are you using? v3.2.0 What platform does your issue occur on? (Android/iOS/Both) Currently on Android

image

arslanalidev avatar Mar 24 '21 19:03 arslanalidev

packages.add(new MyReactNativePackage()); you can try removing this line.

Muhammadtayyabb avatar Apr 04 '21 13:04 Muhammadtayyabb

In my case I had to remove packages.add(new SplashScreenReactPackage()); I can only assume that it is auto inlined and it did not need to be added manually.

ZoranRavic avatar May 05 '21 10:05 ZoranRavic

In my case I'm using the lib react-native-bootsplash but the error that I got was the same. I removed the manual link I did, described here. One of the steps from the manual link was to add this line packages.add(new RNBootSplashPackage()); in MainApplication.java so I pretty much did the same thing @ZoranRavic did, removed that line and the other steps from manual link and then my app started working again.

MuriloDutra avatar Jan 06 '22 14:01 MuriloDutra

remove packages.add(new SplashScreenReactPackage());

anazcodesap avatar Nov 08 '23 07:11 anazcodesap

packages.add(new MyReactNativePackage()); you can try removing this line.

It worked thanks, but I have a question why the documentation says to add this package in MainApplication.java/kt even if it can work without this line of code.

anand-netzoptimize avatar Feb 28 '24 06:02 anand-netzoptimize