集成腾讯Bugly使用自动升级
配置build.gradle
android {
defaultConfig {
ndk {
//设置支持的SO库架构
// abiFilters 'armeabi', 'x86', 'armeabi-v7a', 'x86_64', 'arm64-v8a'
abiFilters 'armeabi-v7a'
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
// androidx ...
// Android 7.0及以上 FileProvider
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
// tencent bugly
implementation 'com.tencent.bugly:crashreport_upgrade:latest.release'
implementation 'com.tencent.bugly:nativecrashreport:latest.release'
}
配置AndroidManifest.xml
android:networkSecurityConfig="@xml/network_security_config"
tools:ignore="UnusedAttribute">
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.fileProvider"
android:exported="false"
android:grantUriPermissions="true">
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/provider_paths" />
资源目录xml下新增 network_security_config.xml
android.bugly.qq.com
初始化
Bugly.init(getApplicationContext(), "********", false);