iOS 出现xcrun -sdk iphoneos clang is unable to create an executable file的解决方法

出现

xcrun -sdk iphoneos clang is unable to create an executable file.

终端输入:

xcodebuild -showsdks

如果出现和下方一样的内容,则说明你的 Xcode 命令行工具路径错误.

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

终端继续输入:

sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer/

解决.

你可能感兴趣的:(iOS 出现xcrun -sdk iphoneos clang is unable to create an executable file的解决方法)