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
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
It's seems like the package have changed location. It used to be com.cboy.rn
and now seems to be org.devio.rn
So in MainApplication.java
import org.devio.rn.splashscreen.SplashScreenReactPackage;
And in MainActivity.java
import org.devio.rn.splashscreen.SplashScreen;
But even then the app kept crashing, So I re-install everything and the paths were correct this time with the Automatic Installation.
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;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With