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

问题描述 投票:0回答:4

我收到两个错误,

  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。

提前致谢。

ios xcode cordova cocoapods
4个回答
1
投票

我找到了解决方案。

我们需要对 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项目中尝试过这个解决方案。


1
投票

@Yash 的回答对我有帮助。

我在 iOS 上使用 Xcode Cloud 构建 Flutter 项目并遇到了同样的错误。

iOS/Flutter/Release.xcconfig:

改变:

#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
#include "Generated.xcconfig"

致:

#include? "../Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
#include "Generated.xcconfig"

0
投票

就我而言,我将 ios 文件夹替换为新创建的应用程序的 ios 文件夹,并调整 info.plist 和 project.pbxproj 文件上的更改


0
投票

就我而言,我尝试过

1-

pod repo update /pod deintegrate / pod install
没有成功 然后我注意到我的
Runner>Flutter
中 Debug.xcconfig 和 Release.xcconfig 都丢失了 所以我从旧项目复制了这两个文件 文件的内容是

调试.xcconfig:

#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
#include "Generated.xcconfig"

发布.xcconfig:

#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
#include "Generated.xcconfig"

这些步骤修复了我的项目,我希望它也能修复你的项目

© www.soinside.com 2019 - 2024. All rights reserved.