Search code examples
react-nativeversionandroidxmismatch

React Native version mismatch when upgrading from 59.5 from 60.4


After upgrading to the newer version of react native (60.4) following all instructions on https://react-native-community.github.io/upgrade-helper/ But still getting this error message:

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'.

Here's a screenshot The point is that I was on version 0.59.5 before upgrading.

Already tried:

 - 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 }

Here is my package.json dependencies:

"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"
  },
  • Node version: 12.8.0
  • Yarn version: 1.17.3

I was able to run after trying watchman watch-del-all && react-native start --reset-cache but all vector-icons were crashed and all firebase-analytics events resulted in app crashing.


Solution

  • Solution was creating a project using react-native init MyProject and them add the libraries in package.json, but react-native-vector-icons still need linking.

    The only problem is that custom fonts doesn't seen to work at all!