3、工具类
public class ForReportException extends Exception {
public ForReportException() {
}
public ForReportException(String msg) {
super(msg);
}
public ForReportException(String msg, Throwable throwable) {
super(msg, throwable);
}
}
4、实现捕获异常上报代码
public class App extends Application implements IExceptionHandler {
initBugly();
}
private void initBugly() {
CrashReport.initCrashReport(getApplicationContext(), "c50f1d7329", BuildConfig.DEBUG);
}
@Override
protected void attachBaseContext(Context base) {
super.attachBaseContext(base);
/**/
//MultiDex.install(this);
// step1: Initialize the lib.
DefenseCrash.initialize();
// step2: Install the fire wall defense.
DefenseCrash.install(this);
}
@Override
public void onCaughtException(Thr