我一直在使用一个整洁的库来处理强制关闭崩溃:
https://github.com/Ereza/CustomActivityOnCrash
在我决定将firebase通知添加到我的应用程序之前,它一直工作得很好。我只选择了通知,因此只添加了以下依赖项:

compile 'com.google.firebase:firebase-messaging:10.0.1'

出于某种原因,firebase崩溃报告也正在初始化,因为自定义崩溃处理程序看到了它,甚至显示以下消息:
E/CustomActivityOnCrash: IMPORTANT WARNING! You already have an UncaughtExceptionHandler,
are you sure this is correct? If you use ACRA, Crashlytics or similar libraries,
you must initialize them AFTER CustomActivityOnCrash! Installing anyway, but your
original handler will not be called.

我的自定义崩溃处理程序是在我的(应用程序)oncreate()方法中初始化的第一件事,因此我不知道在何处或如何防止firebase崩溃报告加载/初始化自身。
任何帮助都将不胜感激!

最佳答案

感谢@bobsnyder的评论,我找到了我的答案-它引导我搜索并找到之前的问题/答案:
How to disable default Firebase crash reporting?
最终我用这个答案来解决我的问题:

If you want to disable the Firebase Analytics Crash Reporting, use the below
code inside app.gradle file.

configurations {
    all*.exclude group: 'com.google.firebase', module: 'firebase-crash'
}

07-24 09:49
查看更多