Crashlytics德precated方法禁用() [英] Crashlytics deprecated method disabled()

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

问题描述

在使用Crashlytics +面料为Android有一个非常简单的方法来启用和禁用崩溃报告。我用它因此在开发和测试有没有一吨崩溃提醒大家。

When using Crashlytics + Fabric for Android there is a really easy way to enable and disable crash reporting. I use it so during development and testing there aren't a ton of crashes alerting everyone.

Crashlytics crashlytics = new Crashlytics.Builder().disabled(true).build();

残疾人(boolean)方法现在是很precated。有谁知道的替代是什么禁用和编程实现crashlytics?

The disabled(boolean) method is now deprecated. Does anyone know what the replacement is for disabling and enabling crashlytics programmatically?

推荐答案

迈克Crashlytics和面料在这里。

Mike from Crashlytics and Fabric here.

下面是你需要根据你的preference使用什么样的:

Here's what you want to use depending on your preference:

CrashlyticsCore core = new CrashlyticsCore.Builder().disabled(BuildConfig.DEBUG).build();
Fabric.with(this, new Crashlytics.Builder().core(core).build());

Fabric.with(this, new Crashlytics.Builder().core(new CrashlyticsCore.Builder().disabled(BuildConfig.DEBUG).build()).build());

这篇关于Crashlytics德precated方法禁用()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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