error: active developer path ("/Applications/Xcode.app/Contents/Developer") does not exist, use xcode-select to change
之前遇到过这个问题,忘记怎么解决了,回头翻看自己的博客发现没有记录.今天真是浪费了30分钟来搞这个.
第一遇到的问题是 路径问题
/Applications/Xcode 5.1.1.app/Contents/Developer 注意 这是不对的 因为有空格!!!(就是Xcode和5.1.1.app之间)
正确的应该是
/Applications/Xcode\ 5.1.1.app/Contents/Developer/
第二 遇到的问题没有用sudo
xcode-select --switch /Applications/Xcode\ 5.1.1.app/Contents/Developer/
xcode-select: error: --switch must be run as root (e.g. sudo xcode-select --switch <xcode_folder_path>) 注意 这是不对的
正确的应该是
sudo xcode-select --switch /Applications/Xcode\ 5.1.1.app/Contents/Developer/
(转自: http://blog.csdn.net/qi_ruihua/article/details/39314767, 感谢作者)