简体   繁体   中英

get error on android device after run “react-native run-android” command

this is my cmd after run react-native run-android : https://up.20script.ir/file/2412-Capture2.jpg . and this is my phone screen after that : https://up.20script.ir/file/2412-Screenshot-2018-08-17-13-38-38.png . and this in my package.json detail :

  "dependencies": {
    "react": "16.4.1",
    "react-native": "0.56.0"
  },
  "devDependencies": {
    "babel-jest": "23.4.2",
    "babel-preset-react-native": "5.0.2",
    "jest": "23.5.0",
    "react-test-renderer": "16.4.1"
  },

, What am i going to do ?

I think this happened after adding dependency via npm after generating the react-native init project.

just try the below steps:

rm -rf node_modules
rm -rf yarn.lock
rm -rf package-lock.json

then npm install .

As I understood you are using windows, simply delete the above mentioned file and folder.

If it will not work, please comment.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM