What react-native-splash-screen version are you using?
"react-native-splash-screen": "^3.2.0"
What platform does your issue occur on? (Android/iOS/Both)
Android
Describe your issue as precisely as possible :
1) Steps to reproduce the issue or to explain in which case you get the issue
yarn add react-native-splash-screen
./node_modules/react-native/cli.js link react-native-splash-screen
./node_modules/react-native/cli.js run-android --variant=release
I tried following manual installation but I got the same issue as show below. Interestingly, no errors when running with debug variant ./node_modules/react-native/cli.js run-android and I can see the splash screen is working.
2) Interesting logs
...app/node_modules/react-native-splash-screen/android/src/main/java/org/devio/rn/splashscreen/SplashScreen.java:32: error: package R does not exist
mSplashDialog.setContentView(R.layout.launch_screen);
^
...app/node_modules/react-native-splash-screen/android/src/main/java/org/devio/rn/splashscreen/SplashScreen.java:47: error: package R does not exist
int resourceId = fullScreen ? R.style.SplashScreen_Fullscreen : R.style.SplashScreen_SplashTheme;
^
...app/node_modules/react-native-splash-screen/android/src/main/java/org/devio/rn/splashscreen/SplashScreen.java:47: error: package R does not exist
int resourceId = fullScreen ? R.style.SplashScreen_Fullscreen : R.style.SplashScreen_SplashTheme;
^
3 errors
3 warnings
My main activity
package com.example.myapp;
import android.os.Bundle;
import com.facebook.react.ReactActivity;
import com.facebook.react.ReactActivityDelegate;
import com.facebook.react.ReactRootView;
import com.swmansion.gesturehandler.react.RNGestureHandlerEnabledRootView;
import org.devio.rn.splashscreen.SplashScreen;
public class MainActivity extends ReactActivity {
/**
* Returns the name of the main component registered from JavaScript.
* This is used to schedule rendering of the component.
*/
@Override
protected String getMainComponentName() {
return "MyApp";
}
@Override
protected void onCreate(Bundle savedInstanceState) {
SplashScreen.show(this);
super.onCreate(savedInstanceState);
}
@Override
protected ReactActivityDelegate createReactActivityDelegate() {
return new ReactActivityDelegate(this, getMainComponentName()) {
@Override
protected ReactRootView createRootView() {
return new RNGestureHandlerEnabledRootView(MainActivity.this);
}
};
}
Run
react-native info
in your project and share the content.What
react-native-splash-screen
version are you using?What platform does your issue occur on? (Android/iOS/Both)
Describe your issue as precisely as possible : 1) Steps to reproduce the issue or to explain in which case you get the issue
I tried following manual installation but I got the same issue as show below. Interestingly, no errors when running with debug variant
./node_modules/react-native/cli.js run-android
and I can see the splash screen is working.2) Interesting
logs
My main activity