2

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.enter image description here

Community
  • 1
  • 1
Prabhu M
  • 3,534
  • 8
  • 48
  • 87
  • Add a stack trace from crash – Szymon Klimaszewski Sep 15 '16 at 09:13
  • @SzymonKlimaszewski , I have added screen shot and stack trace – Prabhu M Sep 15 '16 at 09:19
  • That's not a stack trace from crash. Look for Exception – Szymon Klimaszewski Sep 15 '16 at 09:30
  • @SzymonKlimaszewski, Its not throwing any exception. When I launch my app, it takes more time before coming to splash screen and obviously ANR dialog pops up. If I uninstall Google play services updates then my app works fine . So its a clear issue of Google play services 9.6.80 and Firebase crash Reporting. How to disable Firebase crash reporting? – Prabhu M Sep 15 '16 at 09:38
  • There is no magic beneath this. Just look at dependencies block in build.gradle file located in the main module and remove firebase-crash dependency. – Szymon Klimaszewski Sep 15 '16 at 10:00
  • Post the dependencies section from your build.gradle file. If you are compiling `com.google.android.gms:play-services:9.4.0` it contains all the Google Play and Firebase libraries, including Crash. – Bob Snyder Sep 15 '16 at 13:17
  • @qbix, I am using com.google.android.gms:play-services:9.0.0 – Prabhu M Sep 15 '16 at 13:26
  • The tooltip message is incorrect - Firebase Crash Reporting is not added automatically by the plugin. Please see my answer for more details. – Doug Stevenson Sep 15 '16 at 20:12

4 Answers4

3

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.

Bob Snyder
  • 37,759
  • 6
  • 111
  • 158
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.

Eshack Nazir
  • 354
  • 3
  • 16
Ram Suthakar
  • 275
  • 2
  • 15
0

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

Gabriele Mariotti
  • 320,139
  • 94
  • 887
  • 841
  • I am not using FirebaseCrash APIs at all. I am using this apply plugin: 'com.google.gms.google-services for Google analytics – Prabhu M Sep 15 '16 at 09:00
0

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.

Doug Stevenson
  • 297,357
  • 32
  • 422
  • 441