开发时如何禁用Crashlytics [英] How to disable Crashlytics while developing
问题描述
我不希望每次愚蠢的事情发送崩溃
另一方面我不想评论 Crashlytics.start()
,可能会忘记取消注释并提交
Marc从Crashlytics这里。在进行调试时,可以通过几种方法来禁用Crashlytics!
-
使用不同的android:versionString进行调试和发布版本,然后从Crashlytics Web信息板中为调试版本禁用崩溃报告
-
将检查调试标志的if语句中的调用结合到Crashlytics.start()。您可以使用自定义标志或类似于此处提出的方法:如何检查APK是否签名或调试构建?
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 other hand I don't want to comment out Crashlytics.start()
and possibly risk forgetting to uncomment it and commit
Marc from Crashlytics here. Here's a couple of ways to disable Crashlytics while you are doing your debug builds!
Use a different android:versionString for debug and release builds and then disable crash reporting from the Crashlytics web dashboard for the debug version.
Wrap the call to Crashlytics.start() in an if statement that checks a debug flag. You could use either a custom flag or an approach like the ones proposed here: How to check if APK is signed or "debug build"?
这篇关于开发时如何禁用Crashlytics的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!