Ionic 4 Http request status 0

When I use http.get(‘myurl’).subscribe(…) i got response like this:
HttpErrorResponse {headers: HttpHeaders, status: 0, statusText: "Unknown Error", url: "....", ok: false, ...}

Normaly when i first installed ionic everything works fine. But when I have changed the config.xml and network_security_config.xml this problem arrived.

my config.xml code that i added:

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

my network_security_config.xml code that I added:

<?xml version="1.0" encoding="utf-8"?>
    <base-config cleartextTrafficPermitted="true">
            <certificates src="system"/>

    <domain-config cleartextTrafficPermitted="true">
        <domain includeSubdomains="true">localhost</domain>

And now I am facing that problem. How can I solve this problem but not to lose my app’s functionalities?