首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >在IOS模拟器中使用Firebase构建Flutter 2.*项目

在IOS模拟器中使用Firebase构建Flutter 2.*项目
EN

Stack Overflow用户
提问于 2021-09-13 15:18:26
回答 1查看 81关注 0票数 0

我一直在努力让这个项目在IOS模拟器中成功构建。

我得到了以下隐含的错误:

代码语言:javascript
运行
复制
While building module 'firebase_core' imported from
    /Users/shanejordan/Documents/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-2.5.2/ios/Classes/FLTSnapshotsInSyncStreamHan
    dler.m:6:
    In file included from <module-includes>:1:
    In file included from /Users/shanejordan/Repositories/HH/flutter_test_ios/ios/Pods/Target Support
    Files/firebase_core/firebase_core-umbrella.h:13:
    In file included from
    /Users/shanejordan/Documents/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_core-1.6.0/ios/Classes/FLTFirebaseCorePlugin.h:11:
    /Users/shanejordan/Documents/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_core-1.6.0/ios/Classes/FLTFirebasePlugin.h:9:9:
    error: include of non-modular header inside framework module 'firebase_core.FLTFirebasePlugin':
    '/Users/shanejordan/Repositories/HH/flutter_test_ios/ios/Pods/Headers/Public/FirebaseCore/FirebaseCore.h'
    [-Werror,-Wnon-modular-include-in-framework-module]
    #import <FirebaseCore/FirebaseCore.h>
            ^
    1 error generated.
    /Users/shanejordan/Documents/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-2.5.2/ios/Classes/FLTSnapshotsInSyncStreamHan
    dler.m:6:9: fatal error: could not build module 'firebase_core'
    #import <firebase_core/FLTFirebasePluginRegistry.h>

我创建了一个新的项目,并且能够在iOS中运行它,但是一旦我为firebase_core添加了pub,我就不能让它在IOS模拟器中运行。我一定漏掉了一些非常基本的东西。

我已经尝试了这个答案中的所有选项,做了所有的技巧,比如重建podfile,打开xcode和更改设置。没有一样东西起作用。Header file (FirebaseCore/FirebaseCore.h) not found, despite importing Firebase.framework

EN

回答 1

Stack Overflow用户

发布于 2021-09-13 16:43:17

these steps对你有帮助吗?

  1. 删除ios/Pod文件夹。

  1. 删除Podfile和Podfile.lock

删除pubspec.lock的

  1. 打开终端并依次运行这些命令

pod cache clean —all

flutter clean

flutter pub get

pod install

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/69165236

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档