How to disable Crashlytics during development

后端 未结 28 2591
心在旅途
心在旅途 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 15:59

    Notice that you can also disable the annoying uploading of symbols in debug build:

    def crashlyticsUploadStoredDeobsDebug = "crashlyticsUploadStoredDeobsDebug"
    def crashlyticsUploadDeobsDebug = "crashlyticsUploadDeobsDebug"
    tasks.whenTaskAdded { task ->
        if (crashlyticsUploadStoredDeobsDebug.equals(task.name) ||
                crashlyticsUploadDeobsDebug.equals(task.name)) {
    
            println "Disabling $task.name."
            task.enabled = false
        }
    }
    

    Just put it into the build.gradle of your application module.

提交回复
热议问题