执行命令
cordova build android
错误提示No resource found that matches the given name (at ‘networkSecurityConfig’ with value '@xml/network_s
解决方法
项目根目录\platforms\android\res\xml
添加文件network_security_config.xml
(名字自定义)
<?xml version="1.0" encoding="utf-8"?>
<network-security-config><base-config cleartextTrafficPermitted="true" />
</network-security-config>
找到文件项目根目录\platforms\android\AndroidManifest.xml
添加android:networkSecurityConfig="@xml/network_security_config"
<application ...
android:networkSecurityConfig="@xml/network_security_config"
...></application>