如果你的xCode不是通过App Store安装的,而是通过dmg或者拷贝app的方式安装。或者你的系统里面安装了多个版本的Xcode,可能使用命令行编译程序的时候会遇到麻烦。
出现:
could not stat active Xcode path ‘/Volumes/Xcode/Xcode.app/Contents/Developer’. (No such file or directory)
解决办法:
xcode-select -switch 新的Xcode路径
如
1
|
sudo
xcode- select
--switch /Applications/Xcode .app /Contents/Developer |