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 查看設(shè)備列表.
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本地服務(wù)
git instaweb --httpd=webrick
開發(fā)者菜單: adb shell input keyevent 82