1down voteaccepted
Have you tried selecting your xcode with xcode-select?
xcode-select -switch /Applications/Xcode.app/Contents/Developer
In most cases…
You could also try to renew the xcodebuild via
$sudo /usr/bin/xcode-select -switch /Applications/Xcode.app/Contents/Developer
$cd /usr/bin
$sudo rm xcodebuild
$ln -s /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild...