问题描述
在通过Carthage Dependency Manager为Some Xcode项目构建SwiftJSON
框架时遇到此错误.
I am getting this error while building the SwiftJSON
framework to the Some Xcode project through Carthage Dependency Manager.
***获取GzipSwift
*** Fetching GzipSwift
***获取SwiftyJSON
*** Fetching SwiftyJSON
***在"3.1.1"处签出GzipSwift
*** Checking out GzipSwift at "3.1.1"
***在"3.1.3"下载SwiftyJSON.framework二进制文件
*** Downloading SwiftyJSON.framework binary at "3.1.3"
*** xcodebuild输出可在/var/folders/7m/y0r2mdhn0f16zz1nlt34ypzr0000gn/T/carthage-xcodebuild.apLXCc.log中找到
*** xcodebuild output can be found in /var/folders/7m/y0r2mdhn0f16zz1nlt34ypzr0000gn/T/carthage-xcodebuild.apLXCc.log
Shell任务(/usr/bin/xcrun xcodebuild -project /Users/vsoftMacmini5/Desktop/GZipDemoApp/Carthage/Checkouts/GzipSwift/Gzip.xcodeproj CODE_SIGNING_REQUIRED =否CODE_SIGN_IDENTITY = CARTHAGE = YES-列表) 失败,退出代码为72:
A shell task (/usr/bin/xcrun xcodebuild -project /Users/vsoftMacmini5/Desktop/GZipDemoApp/Carthage/Checkouts/GzipSwift/Gzip.xcodeproj CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES -list) failed with exit code 72:
xcrun:错误:无法找到实用程序"xcodebuild",而不是开发人员 工具或在PATH中
xcrun: error: unable to find utility "xcodebuild", not a developer tool or in PATH
推荐答案
我通过在Xcode中设置命令行工具解决了该问题.转到:
I solved that problem by setting the Command Line Tools in Xcode. Go to:
然后从下拉菜单中选择命令行工具.如果您仅安装了一个版本的Xcode,则应该只有一个选项.如果您有多个版本的Xcode,则必须选择所需的版本.
And select the command line tool from the dropdown. If you have only one version of Xcode installed, there should be only one option. If you have several versions of Xcode, then you must choose the one you need.
更新(已添加图片以供参考)
这篇关于命令行工具-错误-xcrun:错误:无法找到实用程序"xcodebuild",而不是开发人员工具或在PATH中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!