android定位混淆过后的crash问题
2020-03-05 本文已影响0人
青色石头ing
1.首先接入bugly
引入库
//bugly
api'com.tencent.bugly:crashreport:latest.release'
//其中latest.release指代最新Bugly SDK版本号,也可以指定明确的版本号,例如2.2.0
api'com.tencent.bugly:nativecrashreport:latest.release'
application
// 设置是否为上报进程
CrashReport.UserStrategy strategy =new CrashReport.UserStrategy(this);
strategy.setUploadProcess(processName ==null || processName.equals(packageName));
strategy.setAppChannel(AppUtil.getDtu(this));
CrashReport.initCrashReport(getApplicationContext(), buglyAppId, sDebug, strategy);
2.定位报错信息
报错信息会上报到bugly上,会是混淆过后的
1)在项目的xxx/app/build/outputs/apk/dev/debug会生成一个mapping文件,里面是对应混淆对应的类
帮助我们快速排查问题
2)可以把mapping文件上传到bugly上
3.步骤
打包

mapping文件
