http://blog.csdn.net/wm9028/article/details/51840759?
解決方案: 打開終端輸入:sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
打印當(dāng)前xcode路徑:xcode-select --print-path
然后執(zhí)行 sudo xcode-select -switch +路徑
解決方案:
打開終端命令行浅缸,輸入一下命令:
sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
并一定是這行代碼一疯,要根據(jù)自己的情況蛔添,來修改這個命令行
那么你的命令行就要修改一下:
sudo xcode-select -switch /Applications/Xcode 7.3.1.app/Contents/Developer
根據(jù)你默認(rèn)的xcode來修改在/Applications/和/Contents/Developer中間的app的名字,如果你默認(rèn)的是Xcode x.x.x.app膏秫,中間就要替換掉喲缘缚!
ps:問題還存在笙僚,把xcode全部卸載算撮,只裝一個最新的。
3亿柑、最簡便的方式是:
先在終端輸入”sudo xcode-select -switch “邢疙,然后,打開Xcode—>右鍵顯示包內(nèi)容望薄,找到Developer文件夾拖到終端里面
PS:一些xcode-select的命令的使用:
xcode-select [-help]
xcode-select [-switch xcode_folder_path]
xcode-select [-print-path]
xcode-select [-version]
例如:
打印當(dāng)前xcode的路徑
xcode-select --print-path
輸出:
/Applications/Xcode.app/Contents/Developer