【问题标题】:Problem trying to instantiate Firebase RemoteConfig in Flutter尝试在 Flutter 中实例化 Firebase RemoteConfig 时出现问题
【发布时间】:2020-11-17 13:45:25
【问题描述】:

当我尝试实例化 RemoteConfig 时,我收到此错误并且应用程序崩溃(不是错误,它只是关闭)。 我读过一种解决方法是: 解决方法:转到您的 pub 缓存目录,找到 MethodCallHandler.java 并替换此行:

properties.put(
              "inDebugMode", firebaseRemoteConfigInfo.getConfigSettings().isDeveloperModeEnabled());

有了这个:

properties.put("inDebugMode", false);

问题是该文件不包含描述的任何行。有什么想法吗?

完全错误:

E/flutter ( 4211):  at android.app.ActivityThread.main(ActivityThread.java:7356)
E/flutter ( 4211):  at java.lang.reflect.Method.invoke(Native Method)
E/flutter ( 4211):  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
E/flutter ( 4211):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
E/flutter ( 4211):
F/flutter ( 4211): [FATAL:flutter/shell/platform/android/platform_view_android_jni_impl.cc(942)] Check failed: CheckException(env).
F/libc    ( 4211): Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 4211 (name_app), pid 4211 (name_app)

【问题讨论】:

    标签: firebase flutter firebase-remote-config


    【解决方案1】:

    解决方法对我不起作用,但在我的情况下,只需将我的 android/app/src/main/AndroidManifest.xmlfile 中的 platform('com.google.firebase:firebase-bom:26.4.0') 更改为 implementation platform('com.google.firebase:firebase-bom') 即可解决问题。 干杯

    【讨论】:

      猜你喜欢
      • 2013-10-24
      • 2023-03-11
      • 1970-01-01
      • 1970-01-01
      • 2020-04-05
      • 2015-12-20
      • 1970-01-01
      • 1970-01-01
      • 2016-12-26
      相关资源
      最近更新 更多