React Native Version Mismatch

I am a RN Xiaobai. After I built a new React Native project today, I got the following React Native Version Mismatch error. Du Niang couldn't find the answer. In the end, I could only try to solve it by myself. Now I will record my solution. It is an honor to be able to help you solve such problems.


Change the react native version in the package.json file to be the same as the suggested JavaScript version, and run it ok, as follows:

"dependencies": {
  "expo": "^26.0.0",
  "react": "16.3.1",
  "react-native": "0.50.1"
},

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324824266&siteId=291194637