React native 从59.5版升级到60.4版时应对本机版本不匹配
按照上的所有说明升级到更新版本的react native(60.4)后 但仍会收到此错误消息:React native 从59.5版升级到60.4版时应对本机版本不匹配,react-native,version,androidx,mismatch,React Native,Version,Androidx,Mismatch,按照上的所有说明升级到更新版本的react native(60.4)后 但仍会收到此错误消息: console.error: "React Native version mismatch. JavaScript version: 0.57.8 Native version: 0.60.4 Make sure that you have rebuilt the native code. If the problem persists try clearing the Watchman and
console.error: "React Native version mismatch.
JavaScript version: 0.57.8
Native version: 0.60.4
Make sure that you have rebuilt the native code. If the problem persists try clearing the Watchman and packager caches with 'watchman watch-del-all && react-native start --reset-cache'.
关键是升级之前我使用的是0.59.5版
已尝试:
- Downgrading to 60.0
- Removing node_modules/
- Removing react-navigation (maybe it was using another version of RN, but it is on version 3.11.1 now)
- Another develop environment
- Deleting entire folder and cloning from remote
- implementation ("com.facebook.react:react-native:0.60.4") { force = true }
这是我的package.json
依赖项:
"dependencies": {
"@react-native-community/async-storage": "^1.6.1",
"native-base": "^2.13.4",
"react": "16.8.6",
"react-native": "0.60.4",
"react-native-animatable": "^1.3.0",
"react-native-camera": "^3.0.1",
"react-native-firebase": "^5.5.6",
"react-native-gesture-handler": "^1.3.0",
"react-native-masked-text": "^1.12.5",
"react-native-material-menu": "^0.6.6",
"react-native-push-notification": "^3.1.8",
"react-native-qrcode-scanner": "^1.2.1",
"react-native-vector-icons": "^6.6.0",
"react-navigation": "3.11.1"
},
"devDependencies": {
"@babel/core": "^7.5.5",
"@babel/plugin-transform-runtime": "^7.5.5",
"@babel/runtime": "^7.5.5",
"@react-native-community/eslint-config": "^0.0.5",
"babel-eslint": "^10.0.2",
"babel-jest": "^24.8.0",
"documentation": "12.1.1",
"eslint": "^6.1.0",
"eslint-config-airbnb-base": "^13.2.0",
"eslint-plugin-import": "^2.18.2",
"eslint-plugin-react": "^7.14.3",
"eslint-plugin-react-native": "^3.7.0",
"flow-bin": "^0.98.0",
"jest": "^24.8.0",
"jetifier": "^1.6.3",
"metro-react-native-babel-preset": "^0.55.0",
"react-test-renderer": "16.8.6"
},
- 节点版本:12.8.0
- 纱线版本:1.17.3
在尝试
watchman watch del all&&react native start--reset cache
后,我能够运行,但所有矢量图标都崩溃,所有firebase analytics事件都导致应用程序崩溃。解决方案是使用react native init MyProject
创建一个项目,并在package.json
中添加库,但是,react原生向量图标
仍然需要链接
唯一的问题是自定义字体根本不起作用 解决方案是使用
react native init MyProject
创建一个项目,并在package.json
中添加库,但react native vector icons
仍需要链接
唯一的问题是自定义字体根本不起作用 你能检查一下你是否已经预建了main.jsbundle吗?@SanyamJain我没有这个文件,但是我在我的
项目中验证了一些关于这个的内容。pbxproj
你试过这个吗@SanyamJain仍然是相同的错误,刚刚更新了我的问题您是否尝试重新启动您的计算机?您是否可以检查您是否预构建了main.jsbundle?@SanyamJain我没有该文件,但我验证了在我的项目.pbxproj
中提到的一些内容,您尝试过吗@SanyamJain仍然存在相同的错误,刚刚更新了我的问题您是否尝试重新启动计算机?