Answers for "ionic cordova run andorid cleartext not permitter"

2

net::ERR_CLEARTEXT_NOT_PERMITTED ionic

Add these lines of code on the config.xml file inside <platform> tag.

<access origin="*" />
<preferance name="android:usesCleartextTraffic" value="true" />
<allow-navigation href="*" />
<edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application" xmlns:android="http://schemas.android.com/apk/res/android">
<application android:networkSecurityConfig="@xml/network_security_config" />
<application android:usesCleartextTraffic="true" />
</edit-config>

Then go to resources -> android -> xml -> network-security-config.xml and modify your file like below.

<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">YOUR_API_DOMAIN</domain>
    </domain-config>
</network-security-config>
Posted by: Guest on May-05-2020
2

capcitor FERR_CLEARTEXT_NOT_PERMITTED

Just add this to your AndroidManifest.xml in the tag like

<application android:usesCleartextTraffic="true">
Posted by: Guest on June-08-2020

Code answers related to "ionic cordova run andorid cleartext not permitter"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language