sh -c ‘/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -sdk

卸载了xcode后,重新安装,使用时,出现以下报信息:

/xcrun:1:1: sh -c '/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.5.sdk -find pngcrush 2> /dev/null' failed with exit code 17920: (null) (errno=No such file or directory)

打开xcode的偏好设置项:

sh -c ‘/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -sdk_第1张图片

Locations->Command line Tools选择一下

sh -c ‘/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -sdk_第2张图片

如果没有,就去苹果官方开发者网站下载一下对应的命令行安装一下:

https://developer.apple.com/download/more/

sh -c ‘/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -sdk_第3张图片

安装完成后,再按照第二步选择一下命令行即可。

或者使用以下命令亦行:sudo xcode-select --switch /Library/Developer/CommandLineTools/

你可能感兴趣的:(iOS开发)