【问题标题】:Swift: Jazzy failing to run xcodebuildSwift:Jazzy 无法运行 xcodebuild
【发布时间】:2021-04-14 11:33:00
【问题描述】:

我正在尝试生成一些文档。我的项目使用 Jazzy。但是,当我从命令行运行 jazzy 时,我得到以下输出:

Could not successfully run `xcodebuild`.
Please check the build arguments.
Saved `xcodebuild` log file: /var/folders/nd/t1rlxsp94kgbll0v834jnc0h0000gp/T/xcodebuild-84D58051-E84E-40D8-A4E7-E080B83D7117.log
Failed to generate documentation
Traceback (most recent call last):
    7: from /usr/local/bin/jazzy:23:in `<main>'
    6: from /usr/local/bin/jazzy:23:in `load'
    5: from /usr/local/lib/ruby/gems/2.7.0/gems/jazzy-0.13.6/bin/jazzy:15:in `<top (required)>'
    4: from /usr/local/lib/ruby/gems/2.7.0/gems/jazzy-0.13.6/lib/jazzy/doc_builder.rb:79:in `build'
    3: from /usr/local/lib/ruby/gems/2.7.0/gems/jazzy-0.13.6/lib/jazzy/doc_builder.rb:79:in `chdir'
    2: from /usr/local/lib/ruby/gems/2.7.0/gems/jazzy-0.13.6/lib/jazzy/doc_builder.rb:81:in `block in build'
    1: from /usr/local/lib/ruby/gems/2.7.0/gems/jazzy-0.13.6/lib/jazzy/sourcekitten.rb:266:in `run_sourcekitten'
/usr/local/lib/ruby/gems/2.7.0/gems/jazzy-0.13.6/lib/jazzy/executable.rb:36:in `execute_command': /usr/local/lib/ruby/gems/2.7.0/gems/jazzy-0.13.6/bin/sourcekitten ["doc", "--"] (RuntimeError)

Running xcodebuild

Could not successfully run `xcodebuild`.

Please check the build arguments.

Saved `xcodebuild` log file: /var/folders/nd/t1rlxsp94kgbll0v834jnc0h0000gp/T/xcodebuild-84D58051-E84E-40D8-A4E7-E080B83D7117.log

Failed to generate documentation

为什么从 xcode 构建我的项目没有问题时运行失败

【问题讨论】:

    标签: swift xcode documentation jazzy


    【解决方案1】:

    您可以查看内容

    log file: /var/folders/nd/t1rlxsp94kgbll0v834jnc0h0000gp/T/xcodebuild-84D58051-E84E-40D8-A4E7-E080B83D7117.log
    

    获取详细信息的错误

    【讨论】:

      【解决方案2】:

      Jazzy 需要从命令行构建来生成文档。所以你需要一个类似的命令:

      jazzy --build-tool-arguments -workspace,ios.xcworkspace,-scheme,iosapp
      

      来自https://github.com/realm/jazzy

      ...尝试向 xcodebuild 传递额外的参数,例如 jazzy --build-tool-arguments -scheme,MyScheme,-target,MyTarget


      如何找到要从 Jazzy 传递到 xcodebuild 的方案和目标

      请务必cd 到您的 Xcode 工作区或 Xcode 项目所在的目录: cd path/to/ios.xcworkspace

      xcodebuild -version
      
      # online help
      man xcodebuild
      
      # List schemes & targets
      xcodebuild -list
      

      示例 Xcode 工作区的结果,

      Information about project "ios":
          Targets:
              iosapp
              bench
              dynamic
              static
              bundle
              test
              integration
              Integration Test Harness
      
          Build Configurations:
              Debug
              Release
              RelWithDebInfo
      
          If no build configuration is specified and -scheme is not passed then "RelWithDebInfo" is used.
      
          Schemes:
              bench
              bundle
              CI
              dynamic
              dynamic+static
              Integration Test Harness
              iosapp
              static
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2014-02-01
        • 2015-01-30
        • 1970-01-01
        • 2022-08-04
        • 1970-01-01
        • 2012-06-11
        • 2012-04-08
        相关资源
        最近更新 更多