1
0
mirror of https://github.com/MGislv/NekoX.git synced 2024-07-02 10:33:36 +00:00

Try fix multi dex

This commit is contained in:
世界 2021-04-25 23:06:51 +08:00
parent 06e78c6d1d
commit 71289f6c78
No known key found for this signature in database
GPG Key ID: CD109927C34A63C4

View File

@ -47,7 +47,6 @@ import java.util.Set;
import cn.hutool.core.codec.Base64;
import cn.hutool.core.io.IoUtil;
import kotlin.jvm.functions.Function0;
import tw.nekomimi.nekogram.ExternalGcm;
import tw.nekomimi.nekogram.NekoConfig;
import tw.nekomimi.nekogram.NekoXConfig;
@ -83,16 +82,14 @@ public class ApplicationLoader extends Application {
@Override
protected void attachBaseContext(Context base) {
if (SDK_INT >= Build.VERSION_CODES.P) {
Reflection.unseal(base);
}
super.attachBaseContext(base);
MultiDex.install(this);
try {
applicationContext = getApplicationContext();
} catch (Throwable ignore) {
}
if (SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
MultiDex.install(this);
if (SDK_INT >= Build.VERSION_CODES.P) {
Reflection.unseal(base);
}
Thread.currentThread().setUncaughtExceptionHandler((thread, error) -> {
Log.e("nekox", "from " + thread.toString(), error);