调用部分:
在Application的onCreate()方法中调用下面三行代码:
Utils.init(getApplicationContext());
String dirPath = Environment.getExternalStorageDirectory().getAbsolutePath() +"/yobnMyAPP/log/";
CrashUtils.init(dirPath);
注意:Utils和CrashUtils使用都是开源代码:AndroidUtilCode,gradle引用:implementation'com.blankj:utilcode:1.15.1'
AndroidUtilCode的github地址:https://github.com/Blankj/AndroidUtilCode