Carthage 更新 - 任务失败,退出代码为 65

Mao*_*aor 7 ios swift alamofire carthage

我安装了 2 个版本的 Xcode,8.3.2 和 8.2.1。

\n\n

我正在开发一个用 Swift 2 编写的项目,并通过 Carthage 安装了一些第三方。\n在拉出分支后,我做了carthage update:然后我得到了这个错误:

\n\n
$ carthage update\n*** Fetching SwiftyJSON\n*** Fetching Alamofire\n*** Fetching Reachability.swift\n*** Fetching AlamofireImage\n*** Checking out Alamofire at "3.5.1"\n*** Checking out AlamofireImage at "2.5.0"\n*** Checking out Reachability.swift at "v2.4"\n*** Checking out SwiftyJSON at "54017d514a87b2b855b407131292c510cdeb65f8"\n*** xcodebuild output can be found in /var/folders/6s/5fm277hs03qb526nqykyplk40000gn/T/carthage-xcodebuild.JxFgDC.log\n*** Building scheme "Alamofire watchOS" in Alamofire.xcworkspace\nBuild Failed\n    Task failed with exit code 65:\n    /usr/bin/xcrun xcodebuild -workspace /Users/maor/myProj/myProj/Carthage/Checkouts/Alamofire/Alamofire.xcworkspace -scheme Alamofire\\ watchOS -configuration Release -derivedDataPath /Users/maor/Library/Caches/org.carthage.CarthageKit/DerivedData/Alamofire/3.5.1 -sdk watchos ONLY_ACTIVE_ARCH=NO BITCODE_GENERATION_MODE=bitcode CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES clean build\n\nThis usually indicates that project itself failed to compile. Please check the xcodebuild log for more details: /var/folders/6s/5fm277hs03qb526nqykyplk40000gn/T/carthage-xcodebuild.JxFgDC.log\n
Run Code Online (Sandbox Code Playgroud)\n\n
\n\n
\n

carthage-xcodebuild.JxFgDC.log 的一部分

\n
\n\n
=== CLEAN TARGET Alamofire watchOS OF PROJECT Alamofire WITH CONFIGURATION Release ===\n\nCheck dependencies\n\xe2\x80\x9cSwift Language Version\xe2\x80\x9d (SWIFT_VERSION) is required to be configured correctly for targets which use Swift. Use the [Edit > Convert > To Current Swift Syntax\xe2\x80\xa6] menu to choose a Swift version or use the Build Settings editor to configure the build setting directly.\n\n** CLEAN FAILED **\n\n\nThe following build commands failed:\n    Check dependencies\n(1 failure)\n=== BUILD TARGET Alamofire watchOS OF PROJECT Alamofire WITH CONFIGURATION Release ===\n\nCheck dependencies\n\xe2\x80\x9cSwift Language Version\xe2\x80\x9d (SWIFT_VERSION) is required to be configured correctly for targets which use Swift. Use the [Edit > Convert > To Current Swift Syntax\xe2\x80\xa6] menu to choose a Swift version or use the Build Settings editor to configure the build setting directly.\n\n** BUILD FAILED **\n\n\nThe following build commands failed:\n    Check dependencies\n(1 failure)\n
Run Code Online (Sandbox Code Playgroud)\n

Cod*_*ger 5

我在更新迦太基时遇到了同样的问题。

Build Failed
Task failed with exit code 65: ..... This usually indicates that the project itself failed to compile. Please check the xcode build log for more details: /var/folders/np/1zqyzhbn4ljcb8fmdkz5y90h0000gq/T/carthage-xcodebuild.WE9DXB.log
Run Code Online (Sandbox Code Playgroud)

这是由于指向命令行工具的 Xcode 版本不正确。我更新了版本,问题已解决。您可以从 Xcode 首选项中更改它,这样您就可以在计算机上保留多个 Xcode。Xcode 首选项


Mao*_*aor 3

最后,删除 Xcode 8.3.2 后问题解决了