I'm having trouble with the react-native-splash-screen
React-native info
- Node : 16.17.0
- Yarn : 1.22.19
- react : 18.1.0
- react-native : 0.70.0
Error
MainActivityDelegate cannot be converted to Activity SplashScreen.show(this);
MainActivity.java
`
package com.ala.com.ala;
import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import android.widget.Toast;
import com.facebook.react.ReactActivity;
import com.facebook.react.ReactActivityDelegate;
import com.facebook.react.ReactRootView;
import com.lockincomp.liappagent.LiappAgent;
import org.devio.rn.splashscreen.SplashScreen;
@Override
protected void onCreate(Bundle savedInstanceState) {
SplashScreen.show(this);
...my other codes
super.onCreate(null);
// super.onCreate(savedInstanceState); <- this also tried but not working
}
`
I don't know why I'm having this kind of error. because of React Native 0.7 version error? or what...please help..
I also tried to use react-native-bootsplash but this library also having error in
`@Override
protected void onCreate(Bundle savedInstanceState) {
RNBootSplash.init(this); //this part having error in this
super.onCreate(savedInstanceState); // or super.onCreate(null) with react-native-screens
}`