MacOS Xcode xcodebuild 报错

版权声明:本文为博主原创文章,可以自由转载。 https://blog.csdn.net/u010953692/article/details/89496807

1,终端运行 xcodebuild

$ xcodebuild
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

2,更改xcode路径

  • 打印xcode路径
$ xcode-select --print-path
/Library/Developer/CommandLineTools
  • 修改xcode路径
$ sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer/
$ xcode-select --print-path
/Applications/Xcode.app/Contents/Developer

参考:

  1. xcode-select: error: tool ‘xcodebuild’ requires Xcode

猜你喜欢

转载自blog.csdn.net/u010953692/article/details/89496807