version:1.2.2

fix:
update:增加报错
This commit is contained in:
2023-12-21 10:19:22 +08:00
parent b117888f87
commit 86986c8d58
4 changed files with 33 additions and 9 deletions

View File

@@ -1 +0,0 @@
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":1,"versionName":"1.0","enabled":true,"outputFile":"Launcher3-Q-aosp-withoutQuickstep-debug.apk","fullName":"aospWithoutQuickstepDebug","baseName":"aosp-withoutQuickstep-debug"},"path":"Launcher3-Q-aosp-withoutQuickstep-debug.apk","properties":{}}]

View File

@@ -1 +0,0 @@
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":3,"versionName":"1.3","enabled":true,"outputFile":"Launcher3-Q-aosp-withoutQuickstep-release.apk","fullName":"aospWithoutQuickstepRelease","baseName":"aosp-withoutQuickstep-release"},"path":"Launcher3-Q-aosp-withoutQuickstep-release.apk","properties":{}}]

View File

@@ -50,8 +50,8 @@ android {
minSdkVersion 26
targetSdkVersion 28
versionCode 22
versionName "1.2.1"
versionCode 23
versionName "1.2.2"
ndk {
//选择要添加的对应 cpu 类型的 .so 库。
@@ -59,11 +59,6 @@ android {
// 还可以添加 'x86', 'x86_64', 'mips', 'mips64'
}
manifestPlaceholders = [
XG_ACCESS_ID : "1500026378",
XG_ACCESS_KEY: "AH5QD9ZMBJ6R",
]
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
}

View File

@@ -1,6 +1,8 @@
package com.uiuipad.os.base;
import android.app.Application;
import android.os.Handler;
import android.os.Looper;
import android.util.Log;
import com.tencent.bugly.crashreport.CrashReport;
@@ -43,5 +45,34 @@ public class BaseApplication extends Application {
CrashReport.initCrashReport(getApplicationContext(), "55d55ba689", false);
CrashReport.setDeviceId(this, Utils.getSerial(this));
xcrash.XCrash.init(this);
catchException();
}
private void catchException() {
Thread.setDefaultUncaughtExceptionHandler(
new Thread.UncaughtExceptionHandler() {
@Override
public void uncaughtException(Thread t, Throwable e) {
Log.e("捕获异常子线程:", Thread.currentThread().getName() +
"在:" + e.getStackTrace()[0].getClassName());
}
}
);
//下面是新增方法!
new Handler(Looper.getMainLooper()).post(new Runnable() {
@Override
public void run() {
while (true) {
try {
Looper.loop(); //会先执行这个方法,然后在执行下面的异常捕获方法!
} catch (Exception e) {
Log.e("捕获异常主线程:", Thread.currentThread().getName() +
"在:" + e.getStackTrace()[0].getClassName());
e.printStackTrace();
}
}
}
});
}
}