undefined is not an object (evaluating '_reactNativeSplashScreen2.default.hide')
See original GitHub issueI have already configure my code just like the instruction to use the splash screen but when I compile it using my Redmi Note 3 it returns error like this:
in line of code:
class Main extends Component {
constructor(props) {
super(props);
this._onPressLogo = this._onPressLogo.bind(this);
componentDidMount() {
SplashScreen.hide(); //ERROR here
}
_onPressLogo() {
//this
Actions.about();
}
render() {
return (
<Image style={{ flex: 1, width: null }} source={bg}>
{/* <AndroidBackButton /> */}
<StatusBar backgroundColor="#114D44" />
<View style={{ flex: 1, padding: 15 }}>
<View style={{ flex: 2, justifyContent: 'center', alignItems: 'center' }}>
{/* <TouchableHighlight onPress={this._onPressLogo} > */}
<Image source={logo} />
{/* //</TouchableHighlight>*/}
</View>
</View>
</Image>
);
}
}
react-native: “0.48.4” react-native-splash-screen: “^3.0.1” node: v6.11.2 npm: 5.3.0
please tell me how to handle this case.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:8
- Comments:19
Top Results From Across the Web
reactjs - How to solve this error -> undefined is not an object ...
How to solve this error -> undefined is not an object (evaluating '_app.default.auth) ... I'm new to react native and I am using...
Read more >Undefined is not an object (evaluating 'this._movie.play')
But when its going to start the experiment I receive the following error message: Type Error: Undefined is not an object (evaluating 'this._movie.play'....
Read more >How to Fix TypeError: Null is Not an Object in JavaScript
The JavaScript error TypeError: null is not an object occurs when a property is accessed or a method is called on a null...
Read more >Error "Undefined is not an object (evaluating 'e.default')"
I got an error like this (image), and how to solve it? Please help :( 0. 0.
Read more >undefined is not an object (evaluating 'dataText[i].length')
TypeError : undefined is not an object (evaluating 'dataText[i].length') ... innerHTML = text.substring(0, i+1) +'<span aria-hidden="true"></span>'; ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Make sure you add below lines in MainApplication.java
This will fix the issue!!!
Also make sure you have imported the below package
import org.devio.rn.splashscreen.SplashScreenReactPackage;
You are missing some java code either in MainActivity.java or MainApplication.java.
Make sure you have
new SplashScreenReactPackage()
inside the MainApplication.java otherwise SplashScreen will not be exposed to react code.
I had the same issue adding
new SplashScreenReactPackage()
fixed it.