watchman watch-del-all
react-native start --reset-cache
react-native log-android
react-native run-android
react-native run-android --variant=release
react-native run-ios --simulator="iPhone X"
react-native run-ios --simulator="iPhone Plus 8"
react-native run-ios --configuration Release (非常耗时)
react-native run-ios --configuration Release --device "iPhone"
npm start -- --reset-cache
react-native run-ios --device="iPhone XS Max2"
xcrun simctl list devices 查看设备列表.
react-native run-ios --simulator "iPhone 7 Plus” 指定模拟器
- Clear watchman watches:
watchman watch-del-all
. - Delete the
node_modules
folder:rm -rf node_modules && npm install
. - Reset Metro Bundler cache:
rm -rf /tmp/metro-bundler-cache-*
ornpm start -- --reset-cache
. - Remove haste cache:
rm -rf /tmp/haste-map-react-native-packager-*
.
--开启git本地服务
git instaweb --httpd=webrick
开发者菜单: adb shell input keyevent 82