Xcode Buildtime Error: 'Unable to load contents of file list: '.../Info.plist' (in target 'xxxx')

Xcode Buildtime Error: 'Unable to load contents of file list: '.../Info.plist' (in target 'xxxx')

Xcode 今天开始在一个项目中抛出这个错误,我无法弄清楚它的含义以及如何解决它,而且它没有出现在任何搜索中。它在尝试构建到设备后立即发生(没有脚本编译等):

错误:无法加载文件列表的内容:'/Users/.../Products/Debug-appletvos/myapp.app/Info.plist'(在目标 'myapp' 中)

下面是完整日志,(请注意,为简洁起见,我已将构建文件夹替换为...)

Showing Recent Messages

Prepare build
note: Using new build systemnote: Planning buildnote: Constructing build description

Build system information
error: Unable to load contents of file list: '/Users/.../Products/Debug-appletvos/myapp.app/Info.plist' (in target 'myapp')


Build failed    3/5/19, 3:09 PM    0.2 seconds

到目前为止我尝试过的事情:

其他注意事项:

如果有人以前遇到过这个问题并有解决办法,或者有任何其他故障排除建议,我将不胜感激,谢谢!

终于弄明白了,张贴在这里,以便其他人谷歌搜索可以找到它。

使用 'Input File Lists' 选项的构建脚本存在问题,删除并重新添加脚本解决了该问题。

  • 导航到目标
  • 'Build Phases' 选项卡
  • 'Run Script'阶段
  • 记下那里的内容,将其删除
  • 重新运行确保一切正常
  • 重新添加脚本(以及'Input File Lists'下的内容)

就我而言,我只是在下面修复

  1. 在项目文件夹下打开终端
  2. pod deintegrate
  3. sudo gem install cocoapods-clean
  4. pod clean
  5. 打开项目并删除(如果它仍然存在)应该是红色的“Pods”文件夹
  6. pod setup(这可能需要一些时间)
  7. pod install

问题是您将路径添加到 Input File Lists 而不是 Input Files

过了一会儿我才发现我的同事已经把cocoapods更新到最新版本了,所以我所做的只是

sudo gem install cocoapods

成功了! :)

我是这样解决的:

1、转到项目的目标,-> 构建阶段 -> 嵌入 Pods 框架

2、检查输入文件和输入文件列表、输出文件和输出文件列表。

3、将dir从输入文件列表移动到输入文件,将输出文件列表移动到输出文件

就我而言,问题不在于可可足类动物,而在于织物

我从 Build Phases > Fabric > Input File Lists 中删除了行 $(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH) 并修复了错误

就我而言,我只是在下面修复

1- 转到项目的目标,-> 构建阶段 -> 删除 [CP] 复制 Pods 资源 。 2- pod deintegrate。 3- pod install.

就我而言

pod deintegrate
pod install

够了

首先,你的工作:

  • 删除 .xcworkspace 文件
  • 删除 Podfile.lock 文件和 Pods/ directory
  • 保持 Podfile
  • Re运行 pod install

If the error still occurs,您需要在 .xcconfig 文件中添加 CocoaPods 的 include .xcconfig 路径,方法是在前面添加 #include 语句,如下所示:#include “Pods/[path .xccofig file in Terminal”

示例:

我有两个环境 StagProduction

  • 在我 运行 终端中的 pod 文件之后。您会在终端中看到 CocoaPods 没有设置配置,因为我们已经设置了自定义配置。 CocoaPods 提供了一个link被包含在每个

  • 打开.xcworkspace个文件和select.xcconfig个文件

最后,Cmd + Shift + Krun project

祝你好运!!!

无需解体 pods 并重新安装。刚刚 运行

pod install

它将为新配置创建必要的文件。