xcode查版本xcodebuild -version


終端輸入

xcodebuild -version

如果報錯:

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

報這個錯誤的原因是xcode-select不在默認的路徑
1.找到xcode-select的當前路徑終端命令行

xcode-select --print-path

 

 

2.設置xcode-select到指定位置

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

xcode.app 存放在應用程序(/Applications/Xcode.app/Contents/Developer/   為指定的位置)

 

 

3.驗證是否設置成功

xcode-select --print-path

 

 

再次輸入xcodebuild -version

 


免責聲明!

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



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