ionic3打包错误

时间:2019-07-05
本文章向大家介绍ionic3打包错误,主要包括ionic3打包错误使用实例、应用技巧、基本知识点总结和需要注意事项,具有一定的参考价值,需要的朋友可以参考一下。

打包时出现此错误:
No resource found that matches the given name (at ‘networkSecurityConfig’ with value ‘@xml/network_security_config’).
Error: No resource found that matches the given name (at ‘networkSecurityConfig’ with value ‘@xml/network_security_config’).

在 res 下新增一个 xml 目录,然后创建一个名为:network_security_config.xml 文件(名字自定) ,内容如下,大概意思就是允许开启http请求

<?xml version="1.0" encoding="utf-8"?>

然后在APP的AndroidManifest.xml文件下的application标签增加以下属性

<application

android:networkSecurityConfig="@xml/network_security_config"

/>

参考链接: http://www.ionic.wang/article-index-id-177.html