现在的位置: 首页 > 综合 > 正文

xcode-select: error: tool ‘xcodebuild’ requires Xcode错误解决方法

2019年08月11日 ⁄ 综合 ⁄ 共 463字 ⁄ 字号 评论关闭

因为机子里有两个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错误


抱歉!评论已关闭.