From: http://blog.csdn.net/jymn_chen/article/details/21613745
因为机子里有两个Xcode,所以分别重命名了,但是在运行一个MakeFile时却报了以下错误:
- xcodebuild -target "GHUnitIOS (Device)" -configuration Release SYMROOT=build
- xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
- make: *** [default] Error 1
原因是Xcode重命名后,xcodebuild找不到原来的Xcode了。
解决方法:在终端输入命令
xcode-select -switch 新的xcode路径
例如:
- $ sudo xcode-select --switch /Applications/Xcode\ 5.1.app/Contents/Developer/
参考资料:xcode 4.4 命令行无法找到xcodebuild错误
-----------------------------------------------------------------------------------------------------------
针对我Mac10.9.3中的Xcode6-Beta版本,就是:
zcms-iMac:Developer zcm$ sudo xcode-select --switch /Applications/Xcode6-Beta.app/Contents/Developer/
Password:
zcms-iMac:Developer zcm$