error solved

Fix – React native version mismatch


If you get React native version mismatch error, here is how to fix this issue.

Basically, this error occurs because your project has a different version from the one you already specified on package.json. This also sometimes happened when you are running multiple projects and the server accidentally installed a different react version.

To fix the issue, you can simply try to close all your terminals and start to run the project again.

If you are still experiencing the error, you can force the React Native version that already specified on android/app/build.gradle by opening this file and then change the file just like this:

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

Note: change the 0.52.0 with the version that you are currently using.


Share on social media

//