1

I have my cordova mobile app and I'm trying to build it to .apk so I can run on android.

Within my app I do several http call to my NodeJS API which lays on heroku server. I made sure that I call correct URLs (my heroku server).

My config.xml is:

<?xml version='1.0' encoding='utf-8'?>
<widget id="app.mobile.quickmargo.cordova.id" 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">
    <name>quickmargo</name>
    <description>app for quickmargo mobile</description>
    <author email="dev@cordova.apache.org" href="http://cordova.io">
        Apache Cordova Team
    </author>
    <content src="index.html" />
    <plugin name="cordova-plugin-whitelist" spec="1" />
    <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:*" />
        <edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application">
            <application android:usesCleartextTraffic="true" />
        </edit-config>
    </platform>
    <platform name="ios">
        <allow-intent href="itms:*" />
        <allow-intent href="itms-apps:*" />
    </platform>
</widget>

When I run my project as development to Android Studio AVD emulator everything works fine.

When I build my app I get app-release-unsigned.apk and app-debug.apk when I try to run first one nothing happen I just got meaningless info that file is broken but when I try to run app-debug.apk I got error:

net::ERR_CONNECTION_REFUSED (http://192.168.0.106:8080/)

enter image description here

( screenshot is from BlueStacks emulator )

I was looking for this error in SO and I found this answer which I totally don't understand. What I have wrong?

BT101
  • 3,666
  • 10
  • 41
  • 90

0 Answers0