Browse Source

欢迎页点击崩溃问题

上海闵中
liup 1 month ago
parent
commit
3728cb5e3c
2 changed files with 7 additions and 5 deletions
  1. +0
    -5
      app/src/main/java/com/bonait/bnframework/business/MainInit.java
  2. +7
    -0
      app/src/main/java/com/bonait/bnframework/newui/activity/WelcomeActivity.java

+ 0
- 5
app/src/main/java/com/bonait/bnframework/business/MainInit.java View File

@@ -62,8 +62,6 @@ public class MainInit {
*/
public static void Init(Application app)
{
//0.全局异常捕获,保存为SD卡本级目录 crash
CrashHandler.getInstance().init(app);

//1.设置程序active,初始化Main函数进程,初始化消息日志
InitMsgLog();
@@ -76,9 +74,6 @@ public class MainInit {
// activity生命周期管理
ActivityLifecycleManager.get().init(app);

// QMUI 框架初始化
QMUISwipeBackActivityManager.init(app);

// LitePal 数据库初始化
LitePal.initialize(app);



+ 7
- 0
app/src/main/java/com/bonait/bnframework/newui/activity/WelcomeActivity.java View File

@@ -10,6 +10,7 @@ import android.view.KeyEvent;
import androidx.annotation.NonNull;

import com.apkfuns.logutils.LogUtils;
import com.bonait.bnframework.CrashHandler;
import com.bonait.bnframework.R;
import com.bonait.bnframework.business.MainInit;
import com.bonait.bnframework.common.base.BaseActivity;
@@ -20,6 +21,7 @@ import com.bonait.bnframework.common.utils.ScreenUtils;
import com.bonait.bnframework.manager.ActivityLifecycleManager;
import com.bonait.bnframework.test.TestActivity;
import com.lzy.okgo.OkGo;
import com.qmuiteam.qmui.arch.QMUISwipeBackActivityManager;

import okhttp3.OkHttpClient;
import pub.devrel.easypermissions.EasyPermissions;
@@ -39,6 +41,11 @@ public class WelcomeActivity extends BaseActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// QMUI 框架初始化
QMUISwipeBackActivityManager.init(ConfigName.getInstance().app);
//0.全局异常捕获,保存为SD卡本级目录 crash
CrashHandler.getInstance().init(ConfigName.getInstance().app);

setContentView(R.layout.activity_welcome);

DisplayMetrics dm = new DisplayMetrics();


Loading…
Cancel
Save