React Native version mismatch

Just go to your android/app/build.gradle and then add to the dependencies section:

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

/// the react native version can be found in package.json


This is what I've done with it:

Close all terminals and run build again.

You may forget to close nodejs terminal from another project, and they happen to have installed different react version.

So the code fetches from nodejs server conflicts with the native one.


For Android developers who couldn't get it fixed by just closing and rebuilding, Manually uninstall the app on the emulator/device.


In case you created your react-native app using create-react-native-app. You should have a app.json (expo). and a package.json file, check if the expo versions match and change accordingly. For example in my case the problem was that in the app.json file I had a 25.0.0 version for the expo sdkVersion attribute, I change that to 23.0.0 and everything worked.

package.json:

"dependencies": {
    "expo": "^23.0.4",
    "react": "16.0.0",
    "react-native": "^0.50.4"
  }

app.json:

{
  "expo": {
    "sdkVersion": "23.0.0" // before was 25.0.0
  }
}