React Native version mismatch

React Native version mismatch

This is what Ive done with it:

n

n

Close all terminals and run build again.

n

n

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

n

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

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.

n

package.json:

n

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

n

app.json:

n

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

React Native version mismatch

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

n

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

n

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

Leave a Reply

Your email address will not be published.