Http.get() working but not working in build(Release/Debug) in Ionic 4

I am Guessing that your are getting this because of android changes its http architecture.

to make it working on Android go to your project root folder.

yourAppFolder > resources > android > xml > network_security_config.xml
Change your network security config to blow code.

<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
    <base-config cleartextTrafficPermitted="true">
        <trust-anchors>
            <certificates src="https://stackoverflow.com/questions/59306640/system" />
        </trust-anchors>
    </base-config>
</network-security-config>

Leave a Comment