初始化的的时候指定某一版本
react-native init rnAndroid --version 0.59.10
常用命令
remove node_modules and package-lock.json
npm install
npm install --save react-navigation
npm install --save react-native-gesture-handler
react-native link
npm install --save react-navigation
npm install --save react-native-gesture-handler
npm install --save react-navigation-stack
yarn add react-native-safe-area-view react-native-safe-area-context
npm install @react-native-community/masked-view
rm -rf node_modules && npm install
端口映射:
adb reverse tcp:8082 tcp:8082
日志打印:
react-native log-android