运行
react-native init myProject 创建React-Native项目
react-native run-android
react-native run-ios
映射端口
adb reverse tcp:8089 tcp:8089
react-native start –port 8089
查看端口占用程序
sudo lsof -n -i4TCP:8081
sudo launchctl list | grep 5693
杀掉进程
sudo kill -9 13403
移除
sudo launchctl remove com.mcafee.agent.macmn
package.json配置指定端口启动
"start": "node node_modules/react-native/local-cli/cli.js start --port 8089",
npm start为脚本启动
react-native start 启动需指定端口,不指定默认8081
例如
react-native start --port 8089
'React/RCTBridgeDelegate.h' file not found 解决方案
cd /ios
pod install
cd ..
react-native run-ios
错误及解决方法:could not get batchedbridge react native
react-native bundle --platform android --dev false --entry-file index.android.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res/
网友评论