如何禁用Crashlytics同时开发 [英] How to disable Crashlytics while developing

查看:78
本文介绍了如何禁用Crashlytics同时开发的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有什么简单的办法把Crashlytics Android SDK中关闭,而发展?

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

在另一方面,我不想注释掉 Crashlytics.start()和可能的风险忘记注释,并提交

On the other hand I don't want to comment out Crashlytics.start() and possibly risk forgetting to uncomment it and commit

推荐答案

马克从Crashlytics这里。这里有几种方法来禁用Crashlytics,而你正在做的调试版本!

Marc from Crashlytics here. Here's a couple of ways to disable Crashlytics while you are doing your debug builds!

  1. 使用不同的Andr​​oid版本:VERSIONSTRING用于调试和发布版本,然后禁用崩溃从Crashlytics网络仪表板的调试版本报告

  1. Use a different android:versionString for debug and release builds and then disable crash reporting from the Crashlytics web dashboard for the debug version.

换行调用Crashlytics.start()的if语句来检查调试标志。你可以使用一个自定义的标志或喜欢这里提出的那些做法:的如何检查是否APK进行签名或QUOT;调试版本"?

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆