【问题标题】:unable to spawn process (Argument list too long) after pod install Firebase Analytics pod Xcodepod install Firebase Analytics pod Xcode 后无法生成进程(参数列表太长)
【发布时间】:2020-04-21 08:11:39
【问题描述】:

我正在尝试使用 Cocoapods 将 Firebase Analytics pod 安装到我的项目中。成功运行 pod install 然后构建我的项目后,我收到构建错误 unable to spawn process (Argument list too long)

据我了解,此错误与标头搜索路径参数太长有关。当我将工作区设置为使用旧版构建系统时,项目构建得很好。但是,我只想使用新的构建系统。

运行构建过程的 shell 脚本“Check Pods Manifest.lock”步骤时似乎失败了。

PhaseScriptExecution [CP]\ Check\ Pods\ Manifest.lock /Users/xxx/Library/Developer/Xcode/DerivedData/xxx/Build/Intermediates.noindex/xxx.build/Debug\ (Staging)-iphonesimulator/OV.build/Script-05BB3CCD2FBD4842F78B0F4F.sh (in target 'xxx' from project 'xxx')
    cd /Users/xxx/Documents/Projects/ov-ios
    /bin/sh -c /Users/xxx/Library/Developer/Xcode/DerivedData/xxx/Build/Intermediates.noindex/xxx.build/Debug\\\ \\\(Staging\\\)-iphonesimulator/xxx.build/Script-05BB3CCD2FBD4842F78B0F4F.sh

error: unable to spawn process (Argument list too long) (in target 'xxx' from project 'xxx')

应该注意的是,我的项目有多个构建配置,就像这样。不确定这是否是导致参数列表过长的原因。

Debug (Local)
Debug (Staging)
Debug (Production)
Release (Local)
Release (Staging)
Release (Production)

Pod 文件:

platform :ios, '13.0'
use_frameworks!

def my_pods
    pod "Apollo", '0.16.0'
    pod 'AlamofireImage', '3.5.2'
    pod 'KeychainAccess', '4.1.0'
    pod 'SwiftUIRefresh', '0.0.1'
    pod 'Firebase/Analytics', '6.14.0'
end

target 'MY Project' do
  my_pods
end

【问题讨论】:

  • 有什么解决办法吗?
  • 有什么解决办法吗?

标签: ios swift xcode cocoapods firebase-analytics


【解决方案1】:

打开 'File -> Workspace Settings' 并将 Build System 设置为 Legacy Build System。这解决了我的 Firebase CocoaPods 安装问题。

【讨论】:

  • 这令人沮丧,因为我很惊讶为什么 Pod 仍然依赖旧版构建系统
【解决方案2】:

您可以尝试将 Derived Data 文件夹位置更改为靠近 Disk Root workspace settings

  1. 点击文件
  2. 访问工作区设置
  3. 在派生数据中更改为自定义位置
  4. 然后设置新的短路径

【讨论】:

    【解决方案3】:

    删除 /Users/issingh/Library/Developer/Xcode/DerivedData
    删除应用的“build”文件夹。

    【讨论】:

      【解决方案4】:

      尝试在您的 .podfile 中使用它禁用 cocoapods 统计信息,或直接使用 export

      设置您的环境变量
      ENV['COCOAPODS_DISABLE_STATS'] = 'true'
      

      有关统计数据的更多信息,请访问repo

      或尝试关注threadthread2 以获取更多选项

      【讨论】:

      • 对此没有任何运气。是否有一种特殊的方式我应该设置该环境变量?我将该行粘贴在“use_frameworks!”下面。在我上面原始问题中显示的 podfile 中。
      • 可以设置在 podfile 的顶部。这基本上就是我们在 ruby​​ 文件中设置环境变量的方式。或者您可以直接尝试在终端或 bash 中使用与上述相同的键值设置 env 变量
      猜你喜欢
      • 2023-03-10
      • 2021-06-18
      • 1970-01-01
      • 2021-01-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-01-18
      • 1970-01-01
      相关资源
      最近更新 更多