问题是由于AppLoading启动屏幕没有正确显示导致的。为了解决这个问题,我们可以尝试以下步骤:
import {AppLoading} from 'expo'; import {SplashScreen} from './SplashScreen'; import React, { useState } from 'react';
export default function App() { const [isReady, setIsReady] = useState(false);
const _cacheSplashResourcesAsync = async () => { const gif = require('./assets/splash.gif'); return SplashScreen.preventAutoHideAsync(); };
const _handleFinishLoading = () => { setIsReady(true); SplashScreen.hideAsync(); };
if (!isReady) {
return (
通过这些步骤,您应该能够解决AppLoading启动屏幕不可见的问题。