Livereload ERR_CLEARTEXT_NOT_PERMITTED

Work’s for me thanks dude.

I’m also unable to add the <edit-config> options to config.xml, but this solution worked!

This helped, thanks mate!

Worked for me. Thanks!

Just Replace this:

<application android:networkSecurityConfig="@xml/network_security_config" />

and Add this:

<application android:usesCleartextTraffic="true" />

Example:

<edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application" xmlns:android="http://schemas.android.com/apk/res/android">
    <application android:usesCleartextTraffic="true" />
</edit-config>

I hope to solve your problem.

Where is the config.xml ?

i just run this command :

ionic cordova run android -l --ssl

Add this line in config,xml for android, then remove platform and add it again then try

It should work

Adding domain tag worked for me :+1:

This one did the job for me.

For anyone encountered this on capacitor, open capacitor.config.json then inside the server object, just add “cleartext”: true

for reference:

Worked for me, thank you!

Is it possible to add a wildcard?
For example I don’t know the IP of the device up front, but it will be something like 192.168.x.x
I actually need to do something like: 192.168.*
But that doesnt work.
I can add a static IP and that resolves the error, but it needs to be a wildcard.

Any thoughts?

Worked for me, thank you!

adding domain tag worked for me.
<domain>192.168.0.5<domain>

in

resources/android/xml/network_security_config.xml

Thank you very much, this problem was giving me headaches.

It’s lovely to see even after 4 years people can resolve their issues with a few lines of text you’ve written :smile:

I haven’t been working with Ionic for so long time now and cannot even remember writing these stuff.

ionic and its issues never rust :sweat_smile:
Greetings!