1. 实现UncaughtExceptionHandler接口:uncaughtException方法
2. 继承Application,在OnCreate方法中使用Thread.setDefaultUncaughtExceptionHandler注册异常处理类