本文介绍了错误:无法在 Xcode Build 中生成进程(参数列表太长)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我收到此错误:

错误:无法生成进程(参数列表太长)

** 存档失败 **

以下构建命令失败:CompileSwiftSources 正常 arm64 com.apple.xcode.tools.swift.compiler(1 次失败)

退出代码 =65 "

我浏览了这个链接:

解决方案

就我而言,它是关于 .xcconfig 文件中的自定义配置.我的配置文件包括 Pods 配置,例如:

//Development.xcconfig#include "Pods/Target Support Files/Pods-MyProject/Pods-MyProject.debug (development).xcconfig";#include "Pods/Target Support Files/Pods-MyProjectTests/Pods-MyProjectTests.debug (development).xcconfig";#include "Pods/Target Support Files/Pods-MyProject/Pods-MyProject.release (development).xcconfig";#include "Pods/Target Support Files/Pods-MyProjectTests/Pods-MyProjectTests.release (development).xcconfig";
//Production.xcconfig#include "Pods/Target Support Files/Pods-MyProject/Pods-MyProject.debug (production).xcconfig";#include "Pods/Target Support Files/Pods-MyProjectTests/Pods-MyProjectTests.debug (production).xcconfig";#include "Pods/Target Support Files/Pods-MyProject/Pods-MyProject.release (production).xcconfig";#include "Pods/Target Support Files/Pods-MyProjectTests/Pods-MyProjectTests.release (production).xcconfig";

当我将 Firebase pod 添加到我的 Podfile 中时,这产生了您提到的错误.

所以要再次编译,我必须:

  1. 删除所有包含(#include ...)
  2. 项目中明确设置它们 ->信息 ->配置,如下:

快速提示:

如果您不想手动设置相应的目标配置(带有红色图标的配置),请将它们标记为并运行 pod install.这将自动为您更改.

I am getting this error:

I went through this link:Xcode export localization throws error "Argument list too long"

This article provides a good temporary solution of the problem stating to reduce the path hierarchy. But this does not seem to be an appropriate approach. Can anyone provide me with a different approach to the solution for this problem?

解决方案

In my case, it was about custom configurations in .xcconfig files.My config files were including Pods configurations like:

// Development.xcconfig

#include "Pods/Target Support Files/Pods-MyProject/Pods-MyProject.debug (development).xcconfig"
#include "Pods/Target Support Files/Pods-MyProjectTests/Pods-MyProjectTests.debug (development).xcconfig"

#include "Pods/Target Support Files/Pods-MyProject/Pods-MyProject.release (development).xcconfig"
#include "Pods/Target Support Files/Pods-MyProjectTests/Pods-MyProjectTests.release (development).xcconfig"
// Production.xcconfig

#include "Pods/Target Support Files/Pods-MyProject/Pods-MyProject.debug (production).xcconfig"
#include "Pods/Target Support Files/Pods-MyProjectTests/Pods-MyProjectTests.debug (production).xcconfig"

#include "Pods/Target Support Files/Pods-MyProject/Pods-MyProject.release (production).xcconfig"
#include "Pods/Target Support Files/Pods-MyProjectTests/Pods-MyProjectTests.release (production).xcconfig"

This produced the error you mentioned, when I added Firebase pods into my Podfile.

So to make this compile again I had to:

  1. remove all inclusion (#include ...),
  2. set them explicitly in the Project -> Info -> Configuration, as follows:

Quick tip:

If you don't want manually setting up corresponding target configurations (those with red icon), mark them as None and run pod install. This will automatically change it for you.

这篇关于错误:无法在 Xcode Build 中生成进程(参数列表太长)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 18:40