| | |
| | | */ |
| | | public class MyApplication extends Application { |
| | | public static MyApplication myApplication; |
| | | public String myTag = "-1"; |
| | | public String token; |
| | | |
| | | @Override |
| | | public void onCreate() { |
| | |
| | | |
| | | ApiManager.init(); |
| | | |
| | | |
| | | // JPushInterface.setDebugMode(true); |
| | | // JPushInterface.init(this); |
| | | CrashReport.initCrashReport(getApplicationContext(), "3d4bcf7046", false); |
| | | |
| | | // 设置全局的UncaughtExceptionHandler |
| | | Thread.setDefaultUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() { |
| | | @Override |
| | | public void uncaughtException(Thread thread, Throwable ex) { |
| | | // 这里处理未捕获的异常 |
| | | CrashReport.postCatchedException(ex); |
| | | } |
| | | }); |
| | | } |
| | | } |