How to disable Crashlytics during development

后端 未结 28 2594
心在旅途
心在旅途 2020-11-29 15:42

Is there any simple way to turn Crashlytics Android SDK off while developing ?

I don\'t want it to send a crash every time I do something stupid

On the othe

28条回答
  •  清歌不尽
    2020-11-29 16:00

    Another simple solution that I like, because it doesn't require different manifest files:

    Step 1 - define manifest placeholders in build.gradle

    android {
        ...
        buildTypes {
            release {
                manifestPlaceholders = [crashlytics:"true"]
            }
            debug {
                manifestPlaceholders = [crashlytics:"false"]
            }
        }
        ...
    }
    

    Step 2 - use them in your AndroidManifest.xml

    
    

提交回复
热议问题