ios build xcode-select: error: tool xcodebuild requires Xcode error

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

The reason for reporting this error is that xcode-select is not in the default path

  1. Find the current path terminal command line of xcode-select
xcode-select --print-path
/Library/Developer/CommandLineTools
  1. Set xcode-select to the specified location
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer/ 
  1. Verify that the setup is successful
xcode-select --print-path
/Applications/Xcode.app/Contents/Developer

Guess you like

Origin blog.csdn.net/zxsean/article/details/106384364