世博会卡在闪屏上
Expo Stuck on Splash Screen
我最近使用的 expo 版本和我的应用程序现在无法使用。在我对我的包进行更改之前,我什至尝试将我的应用程序的代码库恢复到之前的提交。我没有收到任何错误,而是应用程序“启动”并卡在默认的 expo 初始屏幕上。
更新:最小可重现示例:https://github.com/atb-brown/expo-issue
更新:新启动的应用似乎可以运行:https://github.com/atb-brown/expo-issue/tree/expo-init
$ expo --version
5.0.3
{
"main": "node_modules/expo/AppEntry.js",
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"web": "expo start --web",
"eject": "expo eject"
},
"dependencies": {
"@expo/vector-icons": "^12.0.0",
"@react-native-async-storage/async-storage": "~1.15.0",
"@react-navigation/bottom-tabs": "^6.0.5",
"@react-navigation/native": "^6.0.2",
"@react-navigation/native-stack": "^6.1.0",
"@types/uuid": "^8.3.4",
"ansi-regex": "^6.0.1",
"eslint-config-prettier": "^8.3.0",
"expo": "^44.0.0",
"expo-asset": "~8.4.6",
"expo-constants": "~13.0.1",
"expo-font": "~10.0.4",
"expo-linking": "~3.0.0",
"expo-splash-screen": "~0.14.1",
"expo-status-bar": "~1.2.0",
"expo-web-browser": "~10.1.0",
"node-notifier": "^10.0.1",
"react": "17.0.1",
"react-dom": "17.0.1",
"react-native": "https://github.com/expo/react-native/archive/sdk-44.0.0.tar.gz",
"react-native-gesture-handler": "~2.1.0",
"react-native-get-random-values": "~1.7.0",
"react-native-reanimated": "~2.3.1",
"react-native-safe-area-context": "3.3.2",
"react-native-screens": "~3.10.1",
"react-native-web": "0.17.1",
"reflect-metadata": "^0.1.13",
"uuid": "^8.3.2"
},
"devDependencies": {
"@babel/core": "^7.12.9",
"@testing-library/jest-native": "^4.0.4",
"@testing-library/react-hooks": "^7.0.2",
"@testing-library/react-native": "^9.0.0",
"@types/react": "~17.0.21",
"@types/react-native": "~0.64.12",
"@typescript-eslint/eslint-plugin": "^5.11.0",
"@typescript-eslint/parser": "^5.11.0",
"eslint": "^8.8.0",
"eslint-config-google": "^0.14.0",
"eslint-plugin-react": "^7.26.0",
"eslint-plugin-react-hooks": "^4.3.0",
"jest": "^26.6.3",
"jest-expo": "^44.0.0",
"prettier": "^2.4.1",
"typescript": "~4.3.5",
"yarn-audit-fix": "^9.0.10"
},
"resolutions": {
"uuid": "^8.3.2"
},
"private": true
}
我 android 上的 Expo Go 应用是 2.23.2 版本。
这是我的应用卡住的屏幕:
我在控制台中没有看到任何错误。这里可能出了什么问题?
事实证明,我遇到的问题是我正在解决 uuid
包。
"resolutions": {
"uuid": "^8.3.2"
}
从我的决议中删除 uuid
解决了我的问题,虽然我仍然不知道到底出了什么问题,但显然 Expo 需要来自不同版本的 uuid 包的东西。
我最近使用的 expo 版本和我的应用程序现在无法使用。在我对我的包进行更改之前,我什至尝试将我的应用程序的代码库恢复到之前的提交。我没有收到任何错误,而是应用程序“启动”并卡在默认的 expo 初始屏幕上。
更新:最小可重现示例:https://github.com/atb-brown/expo-issue
更新:新启动的应用似乎可以运行:https://github.com/atb-brown/expo-issue/tree/expo-init
$ expo --version
5.0.3
{
"main": "node_modules/expo/AppEntry.js",
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"web": "expo start --web",
"eject": "expo eject"
},
"dependencies": {
"@expo/vector-icons": "^12.0.0",
"@react-native-async-storage/async-storage": "~1.15.0",
"@react-navigation/bottom-tabs": "^6.0.5",
"@react-navigation/native": "^6.0.2",
"@react-navigation/native-stack": "^6.1.0",
"@types/uuid": "^8.3.4",
"ansi-regex": "^6.0.1",
"eslint-config-prettier": "^8.3.0",
"expo": "^44.0.0",
"expo-asset": "~8.4.6",
"expo-constants": "~13.0.1",
"expo-font": "~10.0.4",
"expo-linking": "~3.0.0",
"expo-splash-screen": "~0.14.1",
"expo-status-bar": "~1.2.0",
"expo-web-browser": "~10.1.0",
"node-notifier": "^10.0.1",
"react": "17.0.1",
"react-dom": "17.0.1",
"react-native": "https://github.com/expo/react-native/archive/sdk-44.0.0.tar.gz",
"react-native-gesture-handler": "~2.1.0",
"react-native-get-random-values": "~1.7.0",
"react-native-reanimated": "~2.3.1",
"react-native-safe-area-context": "3.3.2",
"react-native-screens": "~3.10.1",
"react-native-web": "0.17.1",
"reflect-metadata": "^0.1.13",
"uuid": "^8.3.2"
},
"devDependencies": {
"@babel/core": "^7.12.9",
"@testing-library/jest-native": "^4.0.4",
"@testing-library/react-hooks": "^7.0.2",
"@testing-library/react-native": "^9.0.0",
"@types/react": "~17.0.21",
"@types/react-native": "~0.64.12",
"@typescript-eslint/eslint-plugin": "^5.11.0",
"@typescript-eslint/parser": "^5.11.0",
"eslint": "^8.8.0",
"eslint-config-google": "^0.14.0",
"eslint-plugin-react": "^7.26.0",
"eslint-plugin-react-hooks": "^4.3.0",
"jest": "^26.6.3",
"jest-expo": "^44.0.0",
"prettier": "^2.4.1",
"typescript": "~4.3.5",
"yarn-audit-fix": "^9.0.10"
},
"resolutions": {
"uuid": "^8.3.2"
},
"private": true
}
我 android 上的 Expo Go 应用是 2.23.2 版本。
这是我的应用卡住的屏幕:
我在控制台中没有看到任何错误。这里可能出了什么问题?
事实证明,我遇到的问题是我正在解决 uuid
包。
"resolutions": {
"uuid": "^8.3.2"
}
从我的决议中删除 uuid
解决了我的问题,虽然我仍然不知道到底出了什么问题,但显然 Expo 需要来自不同版本的 uuid 包的东西。