Browse Source

1.添加bugly,暂未开放使用。

20241218TB223FC(测试jar包)
wangwanlei 7 months ago
parent
commit
82b4d77c7c
2 changed files with 9 additions and 0 deletions
  1. 1
    0
      app/build.gradle.kts
  2. 8
    0
      app/src/main/java/com/xhly/manageapp/ManageApplication.kt

+ 1
- 0
app/build.gradle.kts View File

@@ -147,6 +147,7 @@ dependencies {
147 147
     implementation(libs.androidx.cardview)
148 148
     testImplementation(libs.junit)
149 149
     implementation("com.baidu.lbsyun:BaiduMapSDK_Location_All:9.3.7")
150
+    implementation("com.tencent.bugly:crashreport:latest.release")
150 151
     androidTestImplementation(libs.androidx.test.ext.junit)
151 152
     androidTestImplementation(libs.espresso.core)
152 153
     androidTestImplementation(platform(libs.compose.bom))

+ 8
- 0
app/src/main/java/com/xhly/manageapp/ManageApplication.kt View File

@@ -4,12 +4,15 @@ package com.xhly.manageapp
4 4
 import android.Manifest
5 5
 import android.app.csdk.CSDKManager
6 6
 import android.content.ComponentName
7
+import android.content.Context
7 8
 import android.content.pm.PackageManager
8 9
 import android.os.Build
9 10
 import androidx.core.content.ContextCompat
11
+import androidx.multidex.MultiDex
10 12
 import androidx.multidex.MultiDexApplication
11 13
 import com.hjq.toast.Toaster
12 14
 import com.kongzue.dialogx.DialogX
15
+import com.tencent.bugly.crashreport.CrashReport
13 16
 import com.xhly.corelib.Const
14 17
 import com.xhly.corelib.utils.LogShow
15 18
 import com.xhly.corelib.utils.ModelNameUtils
@@ -689,6 +692,7 @@ class ManageApplication : MultiDexApplication() {
689 692
         super.onCreate()
690 693
         val processName = SystemUtil.getProcessName(this, android.os.Process.myPid())
691 694
         if (processName != null && processName.equals(packageName)) {
695
+            //CrashReport.initCrashReport(applicationContext, "37c72ff74c", false);
692 696
             instance = this
693 697
             val spUtils = SharedPreferencesUtils.getInstance(this)
694 698
             //获取是否已经解除管控
@@ -724,6 +728,10 @@ class ManageApplication : MultiDexApplication() {
724 728
         }
725 729
     }
726 730
 
731
+    override fun attachBaseContext(base: Context?) {
732
+        super.attachBaseContext(base)
733
+        MultiDex.install(this)
734
+    }
727 735
 
728 736
     override fun onTerminate() {
729 737
         super.onTerminate()

Loading…
Cancel
Save