Modify: 添加对bugly的网络规则,否则不能上报异常

This commit is contained in:
Quyunshuo
2020-08-29 16:14:21 +08:00
parent ab2266dc0f
commit f9067c3d46
3 changed files with 12 additions and 5 deletions

View File

@ -39,7 +39,6 @@ class MainActivity :
.request { allGranted, grantedList, deniedList -> .request { allGranted, grantedList, deniedList ->
if (allGranted) { if (allGranted) {
toast("权限全部授予") toast("权限全部授予")
CrashReport.postCatchedException(Throwable("权限全部授予"));
} else { } else {
toast("您拒绝了权限") toast("您拒绝了权限")
} }

View File

@ -16,9 +16,11 @@
android:allowBackup="true" android:allowBackup="true"
android:icon="@mipmap/ic_launcher" android:icon="@mipmap/ic_launcher"
android:label="@string/app_name" android:label="@string/app_name"
android:networkSecurityConfig="@xml/network_security_config"
android:roundIcon="@mipmap/ic_launcher_round" android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true" android:supportsRtl="true"
android:theme="@style/base_AppTheme"> android:theme="@style/base_AppTheme"
tools:ignore="UnusedAttribute">
<!-- 屏幕适配基准DP --> <!-- 屏幕适配基准DP -->
<meta-data <meta-data
android:name="design_width_in_dp" android:name="design_width_in_dp"
@ -26,9 +28,9 @@
<meta-data <meta-data
android:name="design_height_in_dp" android:name="design_height_in_dp"
android:value="640" /> android:value="640" />
<!-- <meta-data--> <!-- <meta-data-->
<!-- android:name="design_height_in_dp"--> <!-- android:name="design_height_in_dp"-->
<!-- android:value="400" />--> <!-- android:value="400" />-->
</application> </application>
</manifest> </manifest>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<domain-config cleartextTrafficPermitted="true">
<domain includeSubdomains="true">android.bugly.qq.com</domain>
</domain-config>
</network-security-config>