Mac Angular打包報錯xcode-select: error: tool 'xcodebuild' requires Xcode


Mac Angular打包報錯:

Error: xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

Angular項目運行,打包需安裝環境如下:

1:安裝node(自己去官網下載指定版本安裝,Angular1.0這種過時的項目是不支持高版本node的),cordova,gulp等。

2:安裝xcode。

     運行打包命令:gulp build:ios:release 報錯如上所述,由於我們在蘋果商店下載的程序安裝在Applications目錄,與/Library/Developer/CommandLineTools目錄不一致。

 

解決方案:

使用以下命令把 xcode 的路徑修改為你安裝的位置即可

sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM