Fetch the repository succeeded.
This action will force synchronization from 无言/SpiderMan, which will overwrite any changes that you have made since you forked the repository, and can not be recovered!!!
Synchronous operation will process in the background and will refresh the page when finishing processing. Please be patient.
SpiderMan能为您做的:
implementation 'com.simple:spiderman:1.0.5'
建议放到Application的初始化中,并且放在其他Library初始化的前面
SpiderMan.getInstance()
.init(this)
//设置是否捕获异常,不弹出崩溃框
.setEnable(true)
//设置是否显示崩溃信息展示页面
.showCrashMessage(true)
//是否回调异常信息,友盟等第三方崩溃信息收集平台会用到,
.setOnCrashListener(new SpiderMan.OnCrashListener() {
@Override
public void onCrash(Thread t, Throwable ex, CrashModel model) {
//CrashModel 崩溃信息记录,包含设备信息
}
});
崩溃信息记录实体,包含设备信息
public class CrashModel implements Parcelable {
/**
* 崩溃主体信息
*/
private Throwable ex;
/**
* 包名,暂时未使用
*/
private String packageName;
/**
* 崩溃主信息
*/
private String exceptionMsg;
/**
* 崩溃类名
*/
private String className;
/**
* 崩溃文件名
*/
private String fileName;
/**
* 崩溃方法
*/
private String methodName;
/**
* 崩溃行数
*/
private int lineNumber;
/**
* 崩溃类型
*/
private String exceptionType;
/**
* 全部信息
*/
private String fullException;
/**
* 崩溃时间
*/
private long time;
/**
* 设备信息
*/
private Device device;
public static class Device implements Parcelable {
//设备名
private String model = Build.MODEL;
//设备厂商
private String brand = Build.BRAND;
//系统版本号
private String version = String.valueOf(Build.VERSION.SDK_INT);
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。