生成插件约束,致命错误:@import firebase_auth找不到模块"firebase_auth";



所以我在我的最后一个项目中得到了这个错误,而试图将它与firebase链接到我的flutter应用程序。

所以对于这个项目,我从我的github下载了它,我从我的pc上传了它,我尝试了flutter run,但它显示了我这个错误:

Desktop/app_with_firebase-main/ios/Runner/GeneratedPluginRegistrant.m:10:9: fatal error: module 'firebase_auth' not found
    @import firebase_auth;
     ~~~~~~~^~~~~~~~~~~~~
    1 error 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.

我试着做flutter clean,然后deleting the pod files,但它不会工作。但是在我的windows中,我在android设备上运行这个项目,它运行得非常好。

任何帮助都是赞赏的,和请解释这个错误意味着什么,因为每次我使用firebase/flutter在我的ios模拟器,我95%的时间会得到这个错误。

谢谢。

不要将firebase_auth包添加到podfile中。将它们添加到您的pubspec中。yaml文件。FIrebase网站上关于将FIrebase集成到应用程序中的说明是专门针对Android和iOS的,但不适用于flutter。

删除您的podfile并尝试再次运行。

我在stackoverflow上尝试了一切,但问题是我的googleservice info。plist文件。我打开。xcworkspace文件并尝试创建构建,它显示了文件未找到的错误,尽管它存在于那里。我通过xcode再次添加文件,选择了跑步者目标,一切都开始工作了。

最新更新