最新版的 react-native 降级处理

时间:2022-06-26 13:49:14

1.react-native 常见操作

(1)react-native init Demo

(2)adb devices

(3)react-native run-android

(4)ipconfig

(5)192.168.200.216:8081  连接connect 失败:格式问题

(6)菜单或左右摇动

(7)react-native start / yarn start / npm start

(8)react-native -v

(9)npm install -g react-native-cli

2.各种报错

最新版:

{
"name": "signApp",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"babel-preset-react-native": "5.0.0",
"react": "16.4.1",
"react-native": "0.56.0"
},
"devDependencies": {
"babel-jest": "23.4.0",
"jest": "23.4.1",
"react-test-renderer": "16.4.1"
},
"jest": {
"preset": "react-native"
}
}

降级后:

{
"name": "signApp",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"babel-core": "^6.26.3",
"babel-loader": "^7.1.5",
"react": "16.4.1",
"react-native": "0.55.4"
},
"devDependencies": {
"babel-jest": "23.4.0",
"babel-preset-react-native": "4.0.0",
"jest": "23.4.1",
"react-test-renderer": "16.4.1"
},
"jest": {
"preset": "react-native"
}
}

.