当程序发生崩溃时,捕抓出错信息,并显示出来,帮助非Debug模式下定位错误。
Step 1. Add it in your root build.gradle at the end of repositories:
allprojects {
repositories {
...
maven { url "https://jitpack.io" }
}
}Step 2. Edit your App build.gradle file and add below dependency:
dependencies {
compile 'com.github.Developmc:CrashHandler:1.0.4'
}public class BaseApplication extends Application {
@Override
public void onCreate() {
super.onCreate();
CrashHandler.init(this,true);
}
}