Browse Source

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

20241218TB223FC(测试jar包)
wangwanlei 8 months ago
parent
commit
82b4d77c7c

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

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

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

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

Loading…
Cancel
Save