无法加载文件列表的内容:'/Target Support Files/Pods-Target Name/Pods-Target Name-frameworks-Debug-input-files.xcfilelist'

Yas*_*hav 10 xcode ios cocoapods cordova

我收到两个错误,

  1. 无法加载文件列表的内容:'/Target Support Files/Pods-Target Name/Pods-Target Name-frameworks-Debug-input-files.xcfilelist'
  2. 无法加载文件列表的内容:'/Target Support Files/Pods-Target Name/Pods-Target Name-frameworks-Debug-output-files.xcfilelist'

以下是我的 Podfile 的内容,

flutter_application_path = 'flutter 模块路径'

加载 File.join(flutter_application_path, '.ios', 'Flutter', 'podhelper.rb')

目标“目标名称”执行

install_all_flutter_pods(flutter_application_path)

结尾

我有一个在我的项目中使用的 flutter 模块。为此,我通过 Podfile 集成该 flutter 模块。

如果有人想了解如何在 iOS 项目中嵌入 flutter 模块,请参考此链接 https://flutter.dev/docs/development/add-to-app/ios/project-setup

我尝试过以下解决方案,

  1. pod 解体和 pod 安装
  2. 删除 pods 文件夹、podfile.lock 和自动生成的project-name.xcworkspace。然后pod安装
  3. 删除 Embed Pods Framework->InputFileLists & OutputFileLists-> Clean Build 中的条目。(执行此操作后,会出现 podfile.lock 文件不同步的另一个错误。请执行 pod install)
  4. 删除派生数据 -> Clean Build。

我正在使用 Xcode 12.2。

提前致谢。

Yas*_*hav 0

我想出了解决这个问题的方法。

我们需要对 build-debug.xcconfig 和 build-release.xcconfig 进行更改。

在 buid-debug.xcconfig 中,进行如下更改,

  1. 注释此行:#include“../pods-debug.xcconfig”
  2. 在注释下方添加以下行:#include "../Pods/Target Support Files/Pods-Target Name/Pods-Target Name.debug.xcconfig"

在 buid-release.xcconfig 中,进行如下更改,

  1. 注释此行:#include“../pods-release.xcconfig”
  2. 在注释下方添加以下行:#include "../Pods/Target Support Files/Pods-Target Name/Pods-Target Name.release.xcconfig"

请注意,我在 Cordova 项目中遇到了这个问题。我还没有在纯原生ios项目中尝试过这个解决方案。