如何在开发过程中禁用Crashlytics

编程入门 行业动态 更新时间:2024-10-28 05:27:46
本文介绍了如何在开发过程中禁用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!

  • 使用其他android:versionString进行调试和发布版本,然后从Crashlytics Web仪表板禁用调试版本的崩溃报告.

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

    在检查调试标志的if语句中包装对Crashlytics.start()的调用.您可以使用自定义标志,也可以使用此处建议的方法:如何检查APK是否已签名或调试构建"?

    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

    本文发布于:2023-07-22 04:02:23,感谢您对本站的认可!
    本文链接:https://www.elefans.com/category/jswz/34/1183971.html
    版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
    本文标签:过程中   如何在   Crashlytics

    发布评论

    评论列表 (有 0 条评论)
    草根站长

    >www.elefans.com

    编程频道|电子爱好者 - 技术资讯及电子产品介绍!