1、错误信息
The webpage at http:/10.255.10.150:82/#/Actualsales could not be loaded because:net::ERR_CLEARTEXT_NOT_PERMMITTED
2、原因
因为安卓要求访问的网址都是https的,恰巧我的这个不是,因为是测试环境,不可能是专门配置https
3、修改方式(一)
AndroidManifest.xml中添加以下配置
android:usesCleartextTraffic="true"
4、修改方式(二)
在xml目录下创建
network_security_config.xml文件,使用以下代码
<network-security-config>
<base-config cleartextTrafficPermitted="true" />
</network-security-config>
然后AndroidManifest.xml中添加以下配置,引用这个配置
android:networkSecurityConfig="@xml/network_security_config"