升级Expo SDK 44至47后出现Java类型转换错误求助
Expo SDK 升级后类型转换错误问题
因苹果iOS打包最低版本要求,我将Expo SDK从44逐步升级至47(依次经过44→45→46→47)。运行expo start时出现错误:
Java.lang.double cannot be cast to abi47*___0_0.com.facebook.react.vbridge.ReadableMap*
已完成的修复操作
- 将react-native-appearance替换为React Core
- 使用
deprecated-react-native-prop-types修复ViewPropTypes相关依赖问题 - 移除已弃用的expo-app-loading
其他尝试
- 更换react-native-svg至12.1.0版本,仅触发Expo版本不匹配警告
- 执行
expo doctor未检测到任何问题
环境信息
- Node版本:16.18.0
package.json 内容
{ "name": "teste", "version": "1.0.0", "scripts": { "start": "expo start --dev-client", "android": "expo run:android", "ios": "expo run:ios", "web": "expo start --web", "eject": "expo eject", "create-component": "plop" }, "dependencies": { "@invertase/react-native-apple-authentication": "^2.2.2", "@miblanchard/react-native-slider": "^2.1.0", "@react-native-async-storage/async-storage": "~1.17.3", "@react-native-community/datetimepicker": "6.5.2", "@react-native-google-signin/google-signin": "^8.2.1", "@react-native-masked-view/masked-view": "0.2.8", "@react-native-picker/picker": "2.4.8", "@react-navigation/native": "^6.0.14", "@react-navigation/stack": "^6.3.5", "@types/uuid": "^8.3.4", "axios": "^1.2.0", "deprecated-react-native-prop-types": "^2.3.0", "expo": "^47.0.0", "expo-app-loading": "~2.1.1", "expo-apple-authentication": "~5.0.1", "expo-asset": "~8.6.2", "expo-auth-session": "~3.7.2", "expo-camera": "~13.1.0", "expo-clipboard": "~4.0.1", "expo-constants": "~14.0.2", "expo-dev-client": "~2.0.1", "expo-font": "~11.0.1", "expo-image-manipulator": "~11.0.0", "expo-image-picker": "~14.0.2", "expo-linking": "~3.2.3", "expo-location": "~15.0.1", "expo-random": "~13.0.0", "expo-secure-store": "~12.0.0", "expo-splash-screen": "~0.17.5", "expo-status-bar": "~1.4.2", "expo-system-ui": "~2.0.1", "expo-updates": "~0.15.6", "i18n-js": "^4.2.0", "i18next": "^22.0.6", "lottie-react-native": "5.1.4", "moment": "^2.29.4", "pluralize": "^8.0.0", "react": "18.1.0", "react-dom": "18.1.0", "react-i18next": "^12.0.0", "react-native": "0.70.5", "react-native-animatable": "^1.3.3", "react-native-appearance": "^0.3.4", "react-native-confetti-cannon": "^1.5.2", "react-native-fbsdk-next": "^11.1.0", "react-native-gesture-handler": "~2.8.0", "react-native-get-random-values": "~1.8.0", "react-native-image-pan-zoom": "^2.1.12", "react-native-iphone-x-helper": "^1.3.1", "react-native-linear-gradient": "2.6.2", "react-native-masked-text": "^1.13.0", "react-native-mime-types": "^2.3.0", "react-native-modal": "^13.0.1", "react-native-safe-area-context": "4.4.1", "react-native-screens": "~3.18.0", "react-native-snap-carousel": "^3.9.1", "react-native-svg": "^12.1.0", "react-native-toast-message": "^2.1.5", "react-native-web": "~0.18.7", "react-redux": "^8.0.5", "redux": "^4.2.0", "redux-thunk": "^2.4.2", "styled-components": "^5.3.6", "styled-system": "^5.1.5", "uuid": "^9.0.0" }, "devDependencies": { "@babel/core": "^7.19.3", "@types/react": "~18.0.24", "@types/react-native": "~0.70.6", "@types/react-native-snap-carousel": "^3.8.5", "@types/styled-components-react-native": "^5.2.0", "@types/styled-system": "^5.1.15", "plop": "^3.1.1", "typescript": "^4.6.3" }, "private": true }
内容的提问来源于stack exchange,提问作者Felipe Eires
相关产品推荐
相关产品推荐

