【问题标题】:Carthage update - Task failed with exit code 65迦太基更新 - 任务失败,退出代码 65
【发布时间】:2017-10-05 11:29:06
【问题描述】:

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

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

$ carthage update
*** Fetching SwiftyJSON
*** Fetching Alamofire
*** Fetching Reachability.swift
*** Fetching AlamofireImage
*** Checking out Alamofire at "3.5.1"
*** Checking out AlamofireImage at "2.5.0"
*** Checking out Reachability.swift at "v2.4"
*** Checking out SwiftyJSON at "54017d514a87b2b855b407131292c510cdeb65f8"
*** xcodebuild output can be found in /var/folders/6s/5fm277hs03qb526nqykyplk40000gn/T/carthage-xcodebuild.JxFgDC.log
*** Building scheme "Alamofire watchOS" in Alamofire.xcworkspace
Build Failed
    Task failed with exit code 65:
    /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

This 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

carthage-xcodebuild.JxFgDC.log 的一部分

=== CLEAN TARGET Alamofire watchOS OF PROJECT Alamofire WITH CONFIGURATION Release ===

Check dependencies
“Swift Language Version” (SWIFT_VERSION) is required to be configured correctly for targets which use Swift. Use the [Edit > Convert > To Current Swift Syntax…] menu to choose a Swift version or use the Build Settings editor to configure the build setting directly.

** CLEAN FAILED **


The following build commands failed:
    Check dependencies
(1 failure)
=== BUILD TARGET Alamofire watchOS OF PROJECT Alamofire WITH CONFIGURATION Release ===

Check dependencies
“Swift Language Version” (SWIFT_VERSION) is required to be configured correctly for targets which use Swift. Use the [Edit > Convert > To Current Swift Syntax…] menu to choose a Swift version or use the Build Settings editor to configure the build setting directly.

** BUILD FAILED **


The following build commands failed:
    Check dependencies
(1 failure)

【问题讨论】:

    标签: ios swift alamofire carthage


    【解决方案1】:

    在尝试为下载的演示项目提取内容后遇到了同样的错误。构建对我来说失败了,因为在尝试在终端中执行 carthage update 命令之前,我没有在 Xcode 项目中设置任何有效的签名身份。

    【讨论】:

      【解决方案2】:

      我在更新 carthage 时遇到了同样的问题。

      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
      

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

      【讨论】:

        【解决方案3】:

        它可能是您要使用的 cocoapods 库的版本,它与您的 Xcode 版本不兼容,因此请确保提供库的版本。例如: github "danielgindi/Charts" 到 github "danielgindi/Charts" ~> 3.2.1

        【讨论】:

          【解决方案4】:

          如果你安装了两个版本的 xcode,你可以这样做: 执行 shell:xcode-select -s(你的 xcode.app 的路径)

          【讨论】:

          • 这对我来说是关键。对于最近安装的 Xcode 新版本,我需要确保 xcode-select 指向正确的工具链。谢谢!
          【解决方案5】:

          最后,在移除 Xcode 8.3.2 后问题解决了

          【讨论】:

          • 您好,Xcode 8.3.2 有什么问题?现在是最新的 Xcoder 版本。
          • @vietstone 我猜问题出在安装了两个 Xcode 上。可能路径出了问题。卸载 8.3.2 后它解决了。
          【解决方案6】:

          假设这是您将更改拉到的新设备:运行carthage bootstrap 以根据docs 进行安装

          【讨论】:

            猜你喜欢
            • 1970-01-01
            • 2017-12-19
            • 1970-01-01
            • 2020-12-19
            • 1970-01-01
            • 2018-03-31
            • 1970-01-01
            • 2016-03-23
            • 2019-07-29
            相关资源
            最近更新 更多