Modify: 添加对bugly的网络规则,否则不能上报异常
This commit is contained in:
@ -39,7 +39,6 @@ class MainActivity :
|
||||
.request { allGranted, grantedList, deniedList ->
|
||||
if (allGranted) {
|
||||
toast("权限全部授予")
|
||||
CrashReport.postCatchedException(Throwable("权限全部授予"));
|
||||
} else {
|
||||
toast("您拒绝了权限")
|
||||
}
|
||||
|
||||
@ -16,9 +16,11 @@
|
||||
android:allowBackup="true"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:label="@string/app_name"
|
||||
android:networkSecurityConfig="@xml/network_security_config"
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/base_AppTheme">
|
||||
android:theme="@style/base_AppTheme"
|
||||
tools:ignore="UnusedAttribute">
|
||||
<!-- 屏幕适配基准DP -->
|
||||
<meta-data
|
||||
android:name="design_width_in_dp"
|
||||
@ -26,9 +28,9 @@
|
||||
<meta-data
|
||||
android:name="design_height_in_dp"
|
||||
android:value="640" />
|
||||
<!-- <meta-data-->
|
||||
<!-- android:name="design_height_in_dp"-->
|
||||
<!-- android:value="400" />-->
|
||||
<!-- <meta-data-->
|
||||
<!-- android:name="design_height_in_dp"-->
|
||||
<!-- android:value="400" />-->
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
6
app/src/main/res/xml/network_security_config.xml
Normal file
6
app/src/main/res/xml/network_security_config.xml
Normal 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>
|
||||
Reference in New Issue
Block a user