xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
报错如下:
1 |
|
报这个错误的原因是 xcode-select 不在默认的路径
找到 xcode-select 的当前路径终端命令行
1
2xcode-select --print-path
/Library/Developer/CommandLineTools设置 xcode-select 到指定位置
1
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer/
验证是否设置成功
1
2xcode-select --print-path
/Applications/Xcode.app/Contents/Developer