Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/flutter/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
缺少firebase_核心/FirebaseCorePlugin.h_Firebase_Flutter_Flutter Dependencies - Fatal编程技术网

缺少firebase_核心/FirebaseCorePlugin.h

缺少firebase_核心/FirebaseCorePlugin.h,firebase,flutter,flutter-dependencies,Firebase,Flutter,Flutter Dependencies,当它尝试运行颤振时,我得到以下错误: Launching lib/main.dart on iPhone XR in debug mode... Running pod install... 2.2s

当它尝试运行颤振时,我得到以下错误:

Launching lib/main.dart on iPhone XR in debug mode...
Running pod install...                                              2.2s
                                                                                                                                                                                                           ├─Assembling Flutter resources...                           1.8s                                                                                             
 └─Compiling, linking and signing...                         4.3s
Xcode build done.                                           10.0s
Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **


Xcode's output:
↳
    === BUILD TARGET Runner OF PROJECT Runner WITH CONFIGURATION Debug ===
    /Users/me/Downloads/myapp2/my_app/ios/Runner/GeneratedPluginRegistrant.m:6:9: fatal error: 'firebase_core/FirebaseCorePlugin.h' file not found
    #import <firebase_core/FirebaseCorePlugin.h>
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    1 error generated.

Could not build the application for the simulator.
Error launching application on iPhone XR.
在调试模式下在iPhone XR上启动lib/main.dart。。。
正在运行pod安装。。。2.2秒
├─集合颤振资源。。。1.8s
└─编译、链接和签名。。。4.3s
Xcode构建完成。10.0秒
无法生成iOS应用程序
Xcode生成的错误输出:
↳
**构建失败**
Xcode的输出:
↳
==使用配置调试生成项目运行程序的目标运行程序===
/Users/me/Downloads/myapp2/my_app/ios/Runner/GeneratedPluginRegistrant.m:6:9:致命错误:找不到“firebase_core/FirebaseCorePlugin.h”文件
#进口
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
生成1个错误。
无法为模拟器生成应用程序。
在iPhone XR上启动应用程序时出错。

flatter-doctor
说一切都是正确的,我运行了
flatter-packages-get
,将频道改为dev,并尝试了多次删除
podspec.lock
Podfile.lock
,但没有成功。虽然我在我的应用程序中看不到这个文件,但我可以在firebase_core git repo中看到它。是否有我可以手动放置的地方可以找到它?

这是如何解决的:

  • 已将颤振重新安装到新目录
  • 已更改为beta版本
    颤振通道beta版
  • 创建了一个新的应用程序
  • 在我的pubspec.yaml文件中,将链接设置为git()中提供的最新firebase_core版本
  • 运行
    flatter包获取
  • 在ios文件夹中,运行
    pod安装

  • 这是如何解决的:

  • 已将颤振重新安装到新目录
  • 已更改为beta版本
    颤振通道beta版
  • 创建了一个新的应用程序
  • 在我的pubspec.yaml文件中,将链接设置为git()中提供的最新firebase_core版本
  • 运行
    flatter包获取
  • 在ios文件夹中,运行
    pod安装
  • dependencies:
      flutter:
        sdk: flutter
      firebase_core: ^0.3.1  # add dependency for Firebase Core