It’ll work fine if you add the config to network_security_config.xml in the resources/android/xml folder.
change it like,
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<domain-config cleartextTrafficPermitted="true">
<domain includeSubdomains="true">localhost</domain>
<domain includeSubdomains="true">Your server ip or domain address</domain>
</domain-config>
</network-security-config>
remember not to include http:// and port number in it.
For Eg: if your server is running at http://123.456.789.00:8080, then the config should be,
<domain includeSubdomains="true">123.456.789.00</domain>