ERR_CLEARTEXT_NOT_PERMITTED in debug app on Android

thanks bro.

  • config xml:
<preferance name="android-usesCleartextTraffic" value="true" />
  <allow-navigation href="*" />

  • network_security_config.xml:
<network-security-config>
    <base-config cleartextTrafficPermitted="true">
        <trust-anchors>
            <certificates src="system" />
        </trust-anchors>
    </base-config>
  <domain-config cleartextTrafficPermitted="true">
    <domain includeSubdomains="true">localhost</domain>
    <domain includeSubdomains="true">http://domain>
  </domain-config>
</network-security-config>

  • AndroidManifest.xml:

android:networkSecurityConfig="@xml/network_security_config"
android:usesCleartextTraffic="true"

Read the steps:

I signed up just to thanks man. It fixed my problem…Great work… :grinning: