开启bugly的错误上报

This commit is contained in:
kehaoyuan
2020-01-20 17:03:52 +08:00
parent c118d7e4ad
commit 98fb4fc412
2 changed files with 5 additions and 11 deletions

View File

@ -102,8 +102,8 @@ public class DataUtils {
CrashReport.setIsDevelopmentDevice(context, Config.DEFAULT_CHANNEL.equals(channel));
CrashReport.UserStrategy strategy = new CrashReport.UserStrategy(context);
strategy.setEnableANRCrashMonitor(false);
strategy.setEnableNativeCrashMonitor(false);
strategy.setEnableANRCrashMonitor(true);
strategy.setEnableNativeCrashMonitor(true);
strategy.setAppChannel(channel);
strategy.setAppVersion(PackageUtils.getVersionName());
@ -238,18 +238,12 @@ public class DataUtils {
}
public static void onError(Context context, Throwable throwable) {
// MTA主动上传错误
//bugly 作为默认处理异常的类库,已经上报了,此处不重复上报
try {
StatService.reportException(context, throwable);
CrashReport.postCatchedException(throwable);
} catch (Exception e) {
}
// //bugly 作为默认处理异常的类库,已经上报了,此处不重复上报
// try {
// CrashReport.postCatchedException(throwable);
// } catch (Exception e) {
// }
//talkingdata
try {
TCAgent.onError(context, throwable);