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

 

 

 

 

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