新增firebase-crashlytics
This commit is contained in:
@@ -102,11 +102,11 @@ public class NeverCrashUtils {
|
||||
Toast.makeText(application, "发生闪退", Toast.LENGTH_SHORT).show();
|
||||
FileUtil.saveStringToFile(new File(application.getDir("files", Context.MODE_PRIVATE).getAbsolutePath()),throwableToString(e),"error.log");
|
||||
getMainCrashHandler().mainException(Looper.getMainLooper().getThread(), e);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
/*
|
||||
//子线程异常拦截
|
||||
Thread.setDefaultUncaughtExceptionHandler((t, e) -> {
|
||||
if (isDebugMode()) {
|
||||
@@ -118,7 +118,7 @@ public class NeverCrashUtils {
|
||||
getMainCrashHandler().mainException(Looper.getMainLooper().getThread(), e);
|
||||
getUncaughtCrashHandler().uncaughtException(t, e);
|
||||
|
||||
});
|
||||
});*/
|
||||
}
|
||||
|
||||
public interface MainCrashHandler {
|
||||
|
||||
Reference in New Issue
Block a user