项目环境说明:
react native version : 0.59.8
xcode: version:11.6
node: 12.18.3
react-native-cli : 2.0.1
通用命令:
界面布局大全: https://github.com/mronion0603/ReactNativeExercise/tree/master/src
网页调试地址:
[http://localhost:8081/debugger-ui/](http://localhost:8081/debugger-ui/)
打开控制面板:F12
ios命令:
"bundle-ios": "react-native bundle --entry-file index.js --platform ios --dev false --bundle-output ios/bundle/main.jsbundle --assets-dest ios/bundle",
1.ios打包参考:https://segmentfault.com/a/1190000019554048
android命令:
-
如果app样式丢失:
执行 cd android 进入
然后执行: gradlew clean
-
Execution failed for task ':app:processDebugResources'
运行出现上面的问题,直接重新运行命令:yanr android就可以了
1.error Could not find iPhone X simulator. Run CLI with --verbose flag for more details.
执行:react-native run-ios --simulator="iPhone 8"
接着报错:error Could not find iPhone 8 simulator. Run CLI with --verbose flag for more details.
项目调试:
android打包参考写的很详细: https://www.jianshu.com/p/4566c38fee64
打包中文文档地址:https://reactnative.cn/docs/0.51/signed-apk-android.html
image.png重点注意:
react-native-debugger中查看网络请求
https://blog.csdn.net/VVVZCS/article/details/100552973?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-3.channel_param&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-3.channel_param
网友评论