error: package com.cboy.rn.splashscreen does not exist

Viewed 7995

i was using this react-native package and it was working fine, until I deleted everything and went for a fresh start, after i set up my project. i did "

npm install

and then npm install react-native-splash-screen and it showed me

react-native-splash-screen@2.1.0

and then when react-native link react-native-splash-screen i get

Scanning 559 folders for symlinks in mydirectory\node_modules (28ms)

now after i set up my files and edit the code as directed here and use

react-native run-android

I get this error

error: package com.cboy.rn.splashscreen does not exist

error: cannot find symbol SplashScreen.show(this); symbol: variable SplashScreen location: class MainActivity

I did not do anything new, neither modified code, Also, i am not sure if it happened at install or link but the output of the command was something like "

dependencies for iOS
dependencies for android

4 Answers

The automatic linking didn't work fully for me and the website instructions seem to be out of date. I had to add these:

\\MainApplication.java
import org.devio.rn.splashscreen.SplashScreenReactPackage;

\\ MainActivity.java
import org.devio.rn.splashscreen.SplashScreen;
import android.os.Bundle;
Related