Modify: 添加对bugly的网络规则,否则不能上报异常
This commit is contained in:
@ -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("您拒绝了权限")
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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>
|
||||||
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