How to disable default Firebase crash reporting?

谁都会走 提交于 2019-12-01 07:36:42

问题


If I use apply plugin: 'com.google.gms.google-services' in my build.gradle, Google says, The default configuration includes Firebase Analytics and Crash Reporting, which can be disabled manually in the SDK.

I need to disable firebase crash reporting as it is creating issues with Google Play Services 9.6.80 (currently in rollout)please check this. How to disable firebase crash reporting from my app?

Please check the attached screen shot for your reference.


回答1:


You need to remove compile com.google.android.gms:play-services:9.0.0 from your build dependencies and replace it with with the individual libraries that you need. A list of the Google Play libraries is provided here, the Firebase libraries are listed here.

When you include play-services:9.x.x, you get all the Google Play and Firebase libraries, including Firebase Crash Reporting.




回答2:


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

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

Currently, google resolved this issue. If you got this issue in future you can try this above code.




回答3:


If you are using the FirebaseCrash APIs to log messages and report caught exceptions, no, there is not currently a way to do this.




回答4:


The piece of information on that tooltip about Crash Reporting being added by default when using the plugin (version 3.0.0) is actually incorrect. We need to correct that. You can verify for yourself what gets added to your project when you apply the google-services plugin version 3.0.0 by running ./gradlew androidDependencies on a fresh Android project with only that plugin applied. You'll see that firebas-crash will not appear in the dependency tree.

The plugin does add Firebase Analytics, which can be disabled programmatically or by configuration if you don't want it to collect data.

Similar disabling of Crash (when it is present, because you declared the dependency in your build.gradle) is a hotly requested feature, and we're working on that.



来源:https://stackoverflow.com/questions/39505604/how-to-disable-default-firebase-crash-reporting

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!