非AppStore安装Xcode的路径设置

来源:互联网 发布:会声会影软件免费吗 编辑:程序博客网 时间:2024/06/06 17:24

如果你的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
0 0