ios/Flutter/Debug.xcconfig:3: 在搜索路径中找不到包含的文件 'Pods-Runner.debug.xcconfig'(在项目 'Runner' 的目标 'Runner' 中)

ios/Flutter/Debug.xcconfig:3: could not find included file 'Pods-Runner.debug.xcconfig' in search paths (in target 'Runner' from project 'Runner')

我在尝试建立 google 登录时遇到了 flutter 项目的问题。 我按照本文中的步骤操作: https://www.freecodecamp.org/news/how-to-integrate-your-ios-flutter-app-with-firebase-on-macos-6ad08e2714f0/

不,我正面临这个问题:

Launching lib/main.dart on iPhone 11 Pro Max in debug mode...
Running Xcode build...
Xcode build done.                                            9,1s
Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **
Xcode's output:
↳
    note: Using new build system
    note: Planning build
    note: Constructing build description
    error: /Users/zagliz/Desktop/testa/ios/Flutter/Debug.xcconfig:3: could not find included file 'Pods-Runner.debug.xcconfig' in search paths (in target 'Runner' from project 'Runner')
    error: /Users/zagliz/Desktop/testa/ios/Flutter/Debug.xcconfig:3: could not find included file 'Pods-Runner.debug.xcconfig' in search paths (in target 'Runner' from project 'Runner')
    error: /Users/zagliz/Desktop/testa/ios/Flutter/Debug.xcconfig:3: could not find included file 'Pods-Runner.debug.xcconfig' in search paths (in target 'Runner' from project 'Runner')
    error: /Users/zagliz/Desktop/testa/ios/Flutter/Debug.xcconfig:3: could not find included file 'Pods-Runner.debug.xcconfig' in search paths (in target 'Runner' from project 'Runner')
    error: /Users/zagliz/Desktop/testa/ios/Flutter/Debug.xcconfig:3: could not find included file 'Pods-Runner.debug.xcconfig' in search paths (in target 'Runner' from project 'Runner')
    error: /Users/zagliz/Desktop/testa/ios/Flutter/Debug.xcconfig:3: could not find included file 'Pods-Runner.debug.xcconfig' in search paths (in target 'Runner' from project 'Runner')
    warning: Capabilities for Signing & Capabilities may not function correctly because its entitlements use a placeholder team ID. To resolve this, select a development team in the Runner editor. (in target 'Runner' from project 'Runner')

Could not build the application for the simulator.
Error launching application on iPhone 11 Pro Max.

在 XCode 中打开 IOS 项目(Runner),导航至 Signing and Capabilities 和 select 开发团队。

希望对您有所帮助

漂亮的亚辛, 我的错误类似:Debug.xcconfig:1: could not find included file 'Generated.xcconfig' in search paths

经验法则 1

对于 ios...

上的 flutter 开发

我们应该总是运行:

flutter build ios

在 xcode.Runner.xcworkspace 打开之前。

此命令将为您的 Runner.xcworkspace 文件准备一个更新且可用的版本:例如,下载 cocoapods 依赖项(运行 pod install)。

经验法则 2

对于 XCode 上的任何 ios 本机开发...

您可能需要设置一些 Development Team

Select 你的主 .xcodeproj >> 选项卡 Sigin & Capabilities >> 团队

在终端中尝试运行这些命令:

$ cd your_project_path
$ rm ios/Flutter/Flutter.podspec
$ rm -fr ios/Pods
$ rm ios/Podfile
$ flutter clean

我的情况:丢失 Debug.xcconfig、Release.xcconfig。

我的解决方案:创建一个新项目 => 运行 => 转到文件夹:ios/Flutter 并复制 2 个文件。