0

I have a react-native app, which does not use expo. I get the following error:

 React Native version mismatch.
                             │ 
                             │ JavaScript version: 0.57.7
                             │ Native version: 0.61.5
                             │ 
                             └ 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`.

I have done everything mentioned in this question and nothing has worked so far.

I have updated react-native version to 0.61.5 . It is installed and it is also mentioned in package.json. I have also updated all packages in packages.json.

The project also uses react-navigation. In @react-navigation file in node modules, in native/package.json file, it is the only place that "react-native": "^0.57.7", is mentioned under devDependencies. I have installed the latest react-navigation, 4.0.10.

razieh babaee
  • 298
  • 5
  • 19

1 Answers1

0

to prevent this issue, you should force React Native version in android/app/build.gradle file use

compile("com.facebook.react:react-native:0.61.5") { force = true }

Change 0.57.7 as per your react-native version.

Hamid Shoja
  • 3,838
  • 4
  • 30
  • 45