手动启用Firebase Crashlytics不会报告崩溃 [英] Firebase Crashlytics not reporting crashes when manually enabled

查看:143
本文介绍了手动启用Firebase Crashlytics不会报告崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Crashlytics在没有选择启用报告的情况下也可以正常工作。但是,一旦我根据教程

Crashlytics works just fine without opt-in reporting. But it stops reporting anything as soon as I set up opt-in reporting according to the tutorial.

具体地说,我将以下内容添加到 AndroidManifest.xml

Specifically, I added the following content to AndroidManifest.xml

<meta-data
    android:name="firebase_crashlytics_collection_enabled"
    android:value="false" />

我将以下内容添加到 onCreate

And I added the following into the onCreate:

 Fabric.with(this, Crashlytics())

使用调试器,我可以确定上面的行已执行。

With a debugger, I am sure that the above line has been executed.

但是,没有任何报告Crashlytics。取而代之的是,记录器提供以下内容,

However, nothing is reported to the Crashlytics. Instead, the logger gives the following,

D/Fabric: Falling back to Crashlytics key lookup from Manifest
D/Fabric: Falling back to Crashlytics key lookup from Strings
D/Fabric: Generating Crashlytics ApiKey from google_app_id in Strings
D/Fabric: Using AdvertisingInfo from Preference Store
D/Fabric: Falling back to Crashlytics key lookup from Manifest
D/Fabric: Falling back to Crashlytics key lookup from Strings
D/Fabric: Build ID is: ...
D/CrashlyticsCore: Crashlytics is disabled, because data collection is disabled by Firebase.
D/Fabric: Initializing io.fabric.sdk.android:fabric [Version: 1.4.6.29], with the following kits:
    com.crashlytics.sdk.android:crashlytics [Version: 2.9.7.29]
    com.crashlytics.sdk.android:beta [Version: 1.2.10.27]
    com.crashlytics.sdk.android:answers [Version: 1.4.5.29]
    com.crashlytics.sdk.android.crashlytics-core [Version: 2.6.6.29]
D/Fabric: Not fetching settings, because data collection is disabled by Firebase.
D/Fabric: Falling back to Crashlytics key lookup from Manifest
D/Fabric: Falling back to Crashlytics key lookup from Strings
D/Fabric: Build ID is: ...
D/Fabric: Analytics collection disabled, because data collection is disabled by Firebase.
D/Fabric: Could not get parcel from Google Play Service to capture AdvertisingId
D/Fabric: Could not get parcel from Google Play Service to capture Advertising limitAdTracking
D/Fabric: AdvertisingInfo not present
D/Fabric: Asychronously getting Advertising Info and storing it to preferences

我已经注意到了有趣的行: D / CrashlyticsCore:Crashlytics被禁用,因为Firebase禁用了数据收集。可能是问题的原因。但是我找不到有关此日志的任何信息。

I have noticed this interesting line: D/CrashlyticsCore: Crashlytics is disabled, because data collection is disabled by Firebase. which is probably the cause of the issue. Yet I can't find any information about this log.

推荐答案

Firebase Crashlytics 2.9.7阻止选择-如文档所述在报告中起作用:将不会执行从代码开始的Crashlytics。
暂时将其降级到2.9.6可使您的代码正常工作。

There is an issue with Firebase Crashlytics 2.9.7 preventing opt-in reporting as described in the documentation to work: the start of Crashlytics from code will not be performed. For the time being downgrading to 2.9.6 will enable your code to work properly.

这篇关于手动启用Firebase Crashlytics不会报告崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆