Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/reactjs/26.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Reactjs SplashScreen隐藏是什么意思?_Reactjs_React Native_Expo_React Native Ios - Fatal编程技术网

Reactjs SplashScreen隐藏是什么意思?

Reactjs SplashScreen隐藏是什么意思?,reactjs,react-native,expo,react-native-ios,Reactjs,React Native,Expo,React Native Ios,我遇到此错误[未处理的承诺拒绝:错误:本机启动屏幕已隐藏。请在呈现任何视图之前调用此方法。] 不确定为什么会发生这种情况,但我只想在继续之前解决这个问题 我的App.js: in App (created by ExpoRoot) in ExpoRoot (at renderApplication.js:45) in RCTView (at View.js:34) in View (at AppContainer.js:106) in DevAppContainer (at AppContain

我遇到此错误
[未处理的承诺拒绝:错误:本机启动屏幕已隐藏。请在呈现任何视图之前调用此方法。]

不确定为什么会发生这种情况,但我只想在继续之前解决这个问题

我的App.js:

in App (created by ExpoRoot)
in ExpoRoot (at renderApplication.js:45)
in RCTView (at View.js:34)
in View (at AppContainer.js:106)
in DevAppContainer (at AppContainer.js:121)
in RCTView (at View.js:34)
in View (at AppContainer.js:132)
in AppContainer (at renderApplication.js:39)
这是我的App.js

从“世博会状态栏”导入{StatusBar};
从“React”导入React;
从'react dom'导入{render};
从“react native”导入{按钮、样式表、文本、视图};
从“./src/navigation/Navigator”导入AppNavigator;
从“expo字体”导入*作为字体;
从“expo应用程序加载”导入{AppLoading};
导出默认类App扩展React.Component{
状态={
isFontLoaded:错误
};
异步组件didmount(){
等待Font.loadAsync({
SemiBold:require('./src/font/Montserrat Regular.ttf'),
介质:需要('./src/font/Montserrat Medium.ttf'),
常规:需要('./src/font/Montserrat Regular.ttf')
});
this.setState({isFontLoaded:true});
}
render(){
如果(!this.state.isfontload){
返回;
}
返回;
}
}

请告诉我如何解决此问题。

这应该会对您有所帮助。您在哪里调用SplashScreen.preventAutoHideAsync()和SplashScreen.hideAsync()?显然,您必须在启动屏幕被隐藏后调用hideAsync()函数。请显示代码中的位置。。。。。。假设您使用的是世博会启动屏幕(否则可能是类似的概念)