How to disable Firebase Crash Reporting when the app is running on debug?

后端 未结 16 1313
谎友^
谎友^ 2020-12-04 13:42

I have successfully implemented Firebase Crash Reporting, but I need to disable the service when the app is running undo the \'debug\' Build Variant, in order to avoid non-r

16条回答
  •  抹茶落季
    2020-12-04 14:33

    You can change the firebase crash dependency to a release only dependency.

    To do this, you define it as a releaseCompile dependency

    releaseCompile 'com.google.firebase:firebase-crash:9.4.0'
    

    Now it will only be included in the release builds. If you have other custom build types that you want crash reporting for, you can add it to them to.

    customBuildTypeCompile 'com.google.firebase:firebase-crash:9.4.0'
    

提交回复
热议问题