gpt4 book ai didi

firebase - Flutter:在框架模块 'firebase_core.FLTFirebasePlugin' 中包含非模块化头文件

转载 作者:行者123 更新时间:2023-12-04 15:05:47 25 4
gpt4 key购买 nike

我一直在尝试在 IOS 设备上运行我的 Flutter 代码。但是,我在 Framework 模块中遇到了一些关于非模块化 header 的错误。
日志:

While building module 'firebase_core' imported from
/Users/admin/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/fi
rebase_auth-0.20.0+1/ios/Classes/FLTFirebaseAuthPlugin.m:5:
In file included from <module-includes>:1:
In file included from
/Users/admin/Desktop/Ali/GuestInMe/ios/Pods/Target Support
Files/firebase_core/firebase_core-umbrella.h:13:
In file included from
/Users/admin/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/fi
rebase_core-0.7.0/ios/Classes/FLTFirebaseCorePlugin.h:11:
/Users/admin/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/fi
rebase_core-0.7.0/ios/Classes/FLTFirebasePlugin.h:9:9: error:
include of non-modular header inside framework module
'firebase_core.FLTFirebasePlugin':
'/Users/admin/Desktop/Ali/GuestInMe/ios/Pods/Headers/Public/Firebase
Core/FirebaseCore.h'
[-Werror,-Wnon-modular-include-in-framework-module]
#import <FirebaseCore/FirebaseCore.h>
^
1 error generated.
/Users/admin/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/fi
rebase_auth-0.20.0+1/ios/Classes/FLTFirebaseAuthPlugin.m:5:9: fatal
error: could not build module 'firebase_core'
#import <firebase_core/FLTFirebasePluginRegistry.h>
~~~~~~~^
2 errors generated.
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description

Could not build the application for the simulator.
Error launching application on iPhone 12 Pro Max.
我试过的:
  • 我试图更改 Xcode 的build设置并允许非模块化导入 -> flutter clean -> pod install in ios folder -> flutter run
  • 尝试将文件从项目更改为公开,但它已经是公开的。
  • 重新安装所有 pod 文件。
    'firebase_core.FLTFirebasePlugin':
    Screenshot
  • 最佳答案

    最终奏效的是:

  • 把所有的pubspec.yaml依赖最新版本。
  • 删除 pubspec.lock , Pods ios 中的文件夹和 Podfile.lock
  • 运行 flutter clean -> flutter pub get -> cd ios -> pod install -> cd .. -> flutter run

  • 你应该很高兴去

    关于firebase - Flutter:在框架模块 'firebase_core.FLTFirebasePlugin' 中包含非模块化头文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66148505/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com