react-native开发环境踩坑

硬件开发环境:Mac电脑

1.按照react-native中文文档进行安装

https://reactnative.cn/docs/getting-started/

2.iso报错

2.1 运行react-native run-ios报错Error: Could not find iPhone X simulator

由于没有找到iPhone X模拟器,不清除为啥XCode并没有自带

解决办法:react-native run-ios --simulator="iPhone 8"

 

2.2 error Failed to build iOS project. We ran “xcodebuild” command but it exited with error code 65

解决办法:

  1. cd /ios
  2. run pod install
  3. cd ..
  4. delete build folder
  5. run react-native run-ios 

参考自:https://stackoverflow.com/questions/55235825/error-failed-to-build-ios-project-we-ran-xcodebuild-command-but-it-exited-wit

 

 

 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章