Apache Cordova (cordova-android) got error net::ERR_CONNECTION_REFUSED

1.2k Views Asked by At

i'm trying to build a Android app with Apache Cordova, i got an error:

Application Error
net::ERR_CONNECTION_REFUSED (http://localhost:8080/index.html)

View image here

Now I don't know what to do...

My config.xml

<?xml version='1.0' encoding='utf-8'?>
<widget id="com.blabla" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
    <!-- metadata ...... !-->
    <content src="index.html" />
    <access origin="*" />
    <allow-intent href="http://*/*" />
    <allow-intent href="https://*/*" />
    <allow-intent href="tel:*" />
    <allow-intent href="sms:*" />
    <allow-intent href="mailto:*" />
    <allow-intent href="geo:*" />
    <platform name="android">
        <allow-intent href="market:*" />
        <icon src="icons/mdpi.png" density="mdpi" />
        <icon src="icons/hdpi.png" density="hdpi" />
        <icon src="icons/xhdpi.png" density="xhdpi" />
        <icon src="icons/xxhdpi.png" density="xxhdpi" />
        <icon src="icons/xxxhdpi.png" density="xxxhdpi" />
        <preference name="android-minSdkVersion" value="23" />
        <edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application">
            <application android:usesCleartextTraffic="true" />
        </edit-config>
    </platform>
</widget>

My plugins

cordova-plugin-inappbrowser
cordova-android-support-gradle-release
cordova-plugin-crypt-file-android

Apache Cordova v11.0.0

Thanks so much!

0

There are 0 best solutions below