Tencent bugly integration steps

Integration steps:

1, log on Tencent bugly , create an application, write down appid, would be to use

2, rely on:

//腾讯Bugly。其中latest.release指代最新Bugly SDK版本号,也可以指定明确的版本号,例如2.2.0
implementation 'com.tencent.bugly:crashreport:latest.release' 

The latest version of the version number can go here: https://bugly.qq.com/v2/sdkDownload

3 to complete the configuration when the app starts:

//获取APP ID并将以下代码复制到项目Application类onCreate()中,Bugly会为自动检测环境并完成配置:
CrashReport.initCrashReport(getApplicationContext(), "第一步说的appid", false);

Integration is completed.

Precautions:

1, the third step of the method of the above parameters, the third parameter is the SDK debug mode switch, debug mode behavioral characteristics are as follows:

  • Detail of the output of the Log Bugly SDK;
  • Each Crash will be reported immediately;
  • Custom output will Logcat log in.

Recommendation set to true in the testing phase, is set to false when released.

 

2, in order to ensure the accuracy of operational data, it is recommended not to initialize Bugly asynchronous thread.

 

3, the authority:

<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.READ_LOGS" />

 

4, avoid confusion Bugly, Proguard confusion in the following configuration file:

-dontwarn com.tencent.bugly.**
-keep public class com.tencent.bugly.**{*;}

 

Published 60 original articles · won praise 13 · views 20000 +

Guess you like

Origin blog.csdn.net/qq_35584878/article/details/103090112