我遇到了同样的问题。我注意到我已经将我的应用程序从开发切换到生产,然后又回到开发。
问题是当我在最后一步切换到开发时,缓存仍在生产中。
我的控制台中的日志是:
Running application "main" with appParams: {"initialProps":{"exp":{"initialUri":"exp://192.168.43.89:19000","manifest":{"iconUrl":"http://192.168.43.89:19001/assets/./assets/icon.png","isVerified":true,"hostUri":"192.168.43.89:19000","version":"1.0.0","slug":"myapp","splash":{"resizeMode":"contain","backgroundColor":"#f7be13","image":"./assets/splash.png","imageUrl":"http://192.168.43.89:19001/assets/./assets/splash.png"},"logUrl":"http://192.168.43.89:19000/logs","privacy":"public","assetBundlePatterns":["**/*"],"primaryColor":"#023C69","android":{"versionCode":1,"package":"com.apppzzzz.myapp","config":{"googleMaps":{"apiKey":""},"googleSignIn":{"certificateHash":"STRING","apiKey":"STRING"}}},"orientation":"portrait","bundleUrl":"http://192.168.43.89:19001/node_modules/expo/AppEntry.bundle?platform=android&dev=false&minify=true&hot=false&assetPlugin=E%3A%5Ccde%5CTutorial%5CReactNative%5Cmyapp_rnapp%5Cnode_modules%5Cexpo%5Ctools%5ChashAssetFiles.js","updates":{"fallbackToCacheTimeout":0},"ios":{"supportsTablet":true},"packagerOpts":{"dev":false,"lanType":"ip","hostType":"lan","minify":true,"urlRandomness":"ha-wky"},"sdkVersion":"32.0.0","mainModuleName":"node_modules/expo/AppEntry","xde":true,"id":"@anonymous/myapp-dec62901-f76d-419c-8e72-76f2c0e279d7","androidStatusBar":{"backgroundColor":"#f7be10"},"debuggerHost":"192.168.43.89:19001","platforms":["ios","android"],"env":{},"icon":"./assets/icon.png","loadedFromCache":true,"developer":{"tool":"expo-cli","projectRoot":"E:\\cde\\Tutorial\\ReactNative\\myapp_rnapp"},"name":"myapp"},"shell":false}},"rootTag":1}
. __DEV__ === false, development-level warning are OFF, performance optimizations are ON
注意__DEV__ === false
所以我清除了控制台中的缓存,SHIFT+R
然后转到我的手机并清除了 Expo 应用程序的缓存
然后重新启动我的开发服务器,一切顺利!
日志__DEV__ === false
更改为__DEV__ === true
,并且 expo-reloading 问题消失了!