AgentWeb的报错提示:网页无法打开 位于 http://www.xxx.com/xxx.html 的网页无法加载,因为: net::ERR_CLEARTEXT_NOT_PERMITTED

AgentWeb的报错提示:
在这里插入图片描述

解决问题,在AndroidManifest.xml里的application下加入属性:android:networkSecurityConfig=“@xml/network_config”

在res上创建xml—>network_config文件,network_config文件内容:

<network-security-config>
    <base-config cleartextTrafficPermitted="true" />
    <debug-overrides>
        <trust-anchors>
            <certificates src="system" />
            <certificates src="user" />
        </trust-anchors>
    </debug-overrides>
</network-security-config>

其他学习资料:
1、付费专栏《Android kotlin入门到进阶系列讲解》:https://blog.csdn.net/qq_35091074/category_11036895.html
2、免费专栏《Android kotlin开源项目-功能》(可提供源码):https://blog.csdn.net/qq_35091074/category_12005202.html

猜你喜欢

转载自blog.csdn.net/qq_35091074/article/details/132714745