1

Whats the issue?

I get a version mismatch on react native (android).

React Native version mismatch. JavaScript version: 0.59.9 - Native version: 0.63.4

The build works as described in this issue when running through Android Studio. The build however works fine when running: react-native run-android.

Please let me know what else I can try, or what might cause the issue.

React Native version: 0.63.4

Expected Results

The app running as expected

What have I tried to resolve the issue

  • Clearing caches
  • Forcing versions through build.gradle (React Native version mismatch)
  • Going back in history through git
  • Reinstalling / trying other emulator versions
  • Remove node_modules and reinstall
  • Tried react-native-clean-project (https://github.com/pmadruga/react-native-clean-project)
  • Uninstalling the app from the emulator manually
  • Was building with SDK Tools 29, also tried with 30 (was working with 29 before)
  • Tried different versions of Android Studio (4.1, 4.0, 4.1.1. (current))
  • Tried downgrading to RN 0.62.2
  • Tried downgrading to RN 0.63.3

Console Error

3
  • Try changing your version in the package.json file. Modify where it says "react native" or "javascript" to the version you want. Commented Dec 4, 2020 at 18:51
  • The package.json reflects the version i use: '"react-native": "0.63.4",'. There's no javascript mention in the package.json file. Should it? Commented Dec 4, 2020 at 19:03
  • No. Change "react-native" to 0.59.9". Commented Dec 5, 2020 at 15:38

2 Answers 2

0

My "nuclear" option that usually works is to just delete the entire repo from my local machine and then pull it back down from the cloud and start completely fresh.

Definitely not ideal, but sometimes literally nothing else works. I'm not even sure what causes this error as it just appears out of the blue and usually I haven't upgraded react-native for months or even years before it decides to show up.

Sign up to request clarification or add additional context in comments.

1 Comment

Does anyone have any idea what causes it to show?
0

Are you using a library (3rd party) that is using a react-native version different than your project's react native version? in my case i was using react-native-v8 in my project and upon upgrading my rn project's version i got this error, so i matched the versions in the correct way. here is the link for more info, i guess these problems have a similar source. React Native version mismatch

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.