Network_security_config.xml:4: Error: Missing includeSubdomains attribute

Hi there,

I keep getting the below error message when I build my project. I saw a similar post and the answer indicated that this had been resolved. I use the latest ionic however and still get it. Anybody experiencing something similar?

> /home/dx/Desktop/ionic/Android/platforms/android/app/src/main/res/xml/network_security_config.xml:4: Error: Missing includeSubdomains attribute [NetworkSecurityConfig]
>         <domain>localhost</domain>
>          ~~~~~~
> /home/dx/Desktop/ionic/Android/platforms/android/app/src/main/res/xml/network_security_config.xml:5: Error: Duplicate domain names are not allowed [NetworkSecurityConfig]
>  <domain includeSubdomains="true">localhost</domain> 
>                                   ^
>     /home/dx/Desktop/ionic/Android/platforms/android/app/src/main/res/xml/network_security_config.xml:4: Already declared here

Thanks,

Doug

I kept updating the ionic and cordova to the latest but for some reason the network_security_config.xml file had two localdomain entries by default. I had to delete one manually, which I was reluctant to do as I was not sure about the ramifications but it is working now…