简体   繁体   English

没有 Firebase 应用程序'[DEFAULT]':对于带有 firebase_crashlytics 的“添加到应用程序”颤振应用程序

[英]No Firebase App '[DEFAULT]': for 'Add to App' flutter app with firebase_crashlytics

TLDR; TLDR;

How can we configure firebase crashlytics with flutterfire for Add to App I've seen other stackoverflow questions and tried those options already我们如何使用flutterfire为添加到应用程序配置firebase crashlytics我已经看到其他stackoverflow问题并已经尝试过这些选项

Longer version:更长的版本:

  • Parent app, doesn't have any firebase plugins nor firebase.initialize() calls.父应用,没有任何 firebase 插件,也没有 firebase.initialize() 调用。 It just refers to the child package app它只是指子包应用程序
  • In the child app we have fire base plugins and initialize calls.在子应用程序中,我们有火基插件和初始化调用。
  • If you are curious about our setup, its on medium .如果您对我们的设置感到好奇,请使用medium
  • In child's main.dart file we have the following code在孩子的 main.dart 文件中,我们有以下代码
    void main() {
      runZonedGuarded(() async {
        // Initialize Flutter bindings; must come first!
        WidgetsFlutterBinding.ensureInitialized();
        await Firebase.initializeApp(
        );
        ... 

Call stack looks like this调用堆栈看起来像这样

[VERBOSE-2:ui_dart_state.cc(198)] Unhandled Exception: [core/no-app] No Firebase App '[DEFAULT]' has been created - call Firebase.initializeApp()
#0      MethodChannelFirebase.app (package:firebase_core_platform_interface/src/method_channel/method_channel_firebase.dart:193:5)
#1      Firebase.app (package:firebase_core/src/firebase.dart:53:41)
#2      FirebaseCrashlytics.instance (package:firebase_crashlytics/src/firebase_crashlytics.dart:33:55)
#3      main.<anonymous closure> (package:package/main.dart:58:25)
#4      _rootRunBinary (dart:async/zone.dart:1450:47)
#5      _CustomZone.runBinary (dart:async/zone.dart:1342:19)
#6      runZonedGuarded.<anonymous closure> (dart:async/zone.dart:1832:18)
#7      _Zone._processUncaughtError (dart:async/zone.dart:1109:14)
#8      _CustomZone.handleUncaughtError (dart:async/zone.dart:1312:5)
#9      Future._propagateToListeners (dart:async/future_impl.dart:680:16)
#10     Future._completeError (dart:async/future_impl.dart:574:5)
#11     _completeOnAsync<…>

All was well with firebase 1.5.0 but I had to upgrade for crashlytics firebase 1.5.0 一切都很好,但我不得不升级 crashlytics

Change in packages包的变化在此处输入图像描述

So far what I have tried到目前为止我已经尝试过

  1. Generate the file firebase_options.dart file from flutterconfigure and refer to it from the child with following syntax从 flutterconfigure 生成文件 firebase_options.dart 文件,并使用以下语法从子项中引用它
 await Firebase.initializeApp(
      options: DefaultFirebaseOptions.currentPlatform,
    );
  1. Also tried to give name parameter but that didn't help either.还尝试提供name参数,但这也无济于事。

Question is where is the [DEFAULT] project being referenced and how can I remove/edit it?问题是 [DEFAULT] 项目在哪里被引用,我该如何删除/编辑它?

应该使用最新版本的firebase_core和您可能在项目中使用的任何其他 flutterfire 包来解决此问题。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何将 Firebase Crashlytics 添加到 Flutter 应用程序? - How to add Firebase Crashlytics to flutter app? Firebase Crashlytics 安装错误 Flutter - IOS 应用程序 - Error on Firebase Crashlytics installation for Flutter - IOS app 在颤动中使用 try / catch 时 firebase_crashlytics 是否有效? - Does firebase_crashlytics work when using try / catch in flutter? How can we add Firebase Crashlytics in flutter where the flutter app is itself added to existing iOS and Android app? - How can we add Firebase Crashlytics in flutter where the flutter app is itself added to existing iOS and Android app? 将应用程序链接到Firebase Crashlytics时的依赖性问题 - maven / android / flutter - Dependency issue when linking app to Firebase Crashlytics - maven/android/flutter 如何让 Android 和 iOS 的 Flutter App 崩溃(测试 Firebase Crashlytics)? - How to crash Flutter App for Android and iOS (to test Firebase Crashlytics)? 如何使用 Firebase Crashlytics 对 Flutter 应用程序中的 Java 堆栈跟踪进行反混淆 - How to deobfuscate Java stacktrace in Flutter app with Firebase Crashlytics firebase_crashlytics - 是什么触发了报告的上传? - firebase_crashlytics - what triggers the upload of the report? 如何为 Flutter 应用程序的 iOS 部分集成 Firebase Crashlytics? - How to integrate Firebase Crashlytics for iOS part of Flutter app? firebase_crashlytics 已解析为 2.2.1,这取决于 Firebase/Crashlytics (= 8.6.0) - firebase_crashlytics was resolved to 2.2.1, which depends on Firebase/Crashlytics (= 8.6.0)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM