React Native version mismatch (on app that was working a couple of hours ago) - Android
See original GitHub issue- I have reviewed the documentation
- I have searched existing issues
- I am using the latest React Native version
We’ve been working on this React Native app for a fair amount of time. It was working fine even a few hours ago and it suddenly started to give this error. None of the usual solutions (reset cache, reboot terminal and machine) are working.
Environment
Environment: OS: macOS Sierra 10.12.6 Node: 8.11.1 Yarn: 1.5.1 npm: 5.6.0 Watchman: Not Found Xcode: Xcode 9.2 Build version 9C40b Android Studio: 3.0 AI-171.4443003
Packages: (wanted => installed) react: 16.2.0 => 16.2.0 react-native: 0.52.0 => 0.52.0
Steps to Reproduce
react-native init App --version 0.52.0
react-native run-android
Expected Behavior
App should work
Actual Behavior
App doesn’t work
Issue Analytics
- State:
- Created 5 years ago
- Reactions:13
- Comments:33 (1 by maintainers)
Top Results From Across the Web
React Native version mismatch - Stack Overflow
I use rm -rf $TMPDIR/react-* to get rid of any cached builds. If that doesn't work, I try to build the app in...
Read more >Resolving React Native version mismatch errors
This error occurs when the JavaScript and Native bits of your app get out of sync with one another. It's critical that the...
Read more >"React Native version mismatch" errors - Expo Documentation
"React Native version mismatch" errors. When developing an Expo or React Native app, it's not uncommon to run into an error that looks...
Read more >React v18.0 – React Blog
The new rendering behavior in React 18 is only enabled in the parts of your app that use new features. The overall upgrade...
Read more >Upgrading to new versions - React Native
Some upgrades won't be done automatically with the React Native CLI and require manual work, e.g. 0.28 to 0.29 , or 0.56 to...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I was also struggling with this. Somebody has added this https://bintray.com/weimob/maven/react-native/0.55.3 and it will break all React Native Android builds that specify
jcenter()
in project’s repositories. To avoid this issue, you should force React Native version inandroid/app/build.gradle
file like thiscompile ("com.facebook.react:react-native:0.52.0") { force = true }
. Change0.52.0
to version you’re using.@Dror-Bar Use
compile("com.facebook.react:react-native:0.51.0") { force = true }
Instead of
compile "com.facebook.react:react-native:0.51.0" { force = true }