0

I have an app that is working fine in IOS and Browser. However i tried to run on android and keep getting this error enter image description here. I have seen other similar questions here however nothing is working. I cant login/ perform any HTTP requests.

config.xml

<?xml version='1.0' encoding='utf-8'?>
<widget id="io.healthcare" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:cdv="http://cordova.apache.org/ns/1.0">

<platform name="android">
        <edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application">
            <application android:usesCleartextTraffic="true" />
        </edit-config>

network_security_config.xml

<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
    <domain-config cleartextTrafficPermitted="true">
        <domain>localhost</domain>
    </domain-config>
</network-security-config>
c-mac
  • 83
  • 1
  • 9
  • Check this: https://stackoverflow.com/a/54752717/5909026 – Najam Us Saqib Jul 11 '19 at 14:01
  • Possible duplicate of [Why am I seeing net::ERR\_CLEARTEXT\_NOT\_PERMITTED errors after upgrading to Cordova Android 8?](https://stackoverflow.com/questions/54752716/why-am-i-seeing-neterr-cleartext-not-permitted-errors-after-upgrading-to-cordo) – Najam Us Saqib Jul 11 '19 at 14:01
  • Tried both. Still no luck – c-mac Jul 11 '19 at 14:07
  • do not allow clear text traffic (so remove your android:usesCleartextTraffic). Instead, use HTTPS. If you can't get a free SSL certificate for your own website then add `qub.ac.uk` – Zun Jul 11 '19 at 14:28
  • Still is not working. Getting same error – c-mac Jul 11 '19 at 14:37

0 Answers0