[SOLVED] Ionic emulate android ERR_CONNECTION_REFUSED localhost:8100


I try to emulate my Ionic application on Android. Once my application start in the emulated device, it breaks with the following error:

Application Error

net::ERR_CONNECTION_REFUSED (http://localhost:8100)

and also

Webpage not available

The webpage at http://localhost:8100 could not be loaded because: net::ERR_CONNECTION_REFUSED

Debugging same project works like a charm in browser and in iOS debugger.

cordova-plugin-whitelist is already installed and I have the following rule in my config.xml

Any help would be appreciated.

Try to start your application with ionic run -l android. This command will able the logging.

I was running the command

ionic run android -c -s -l --address localhost

Removing “–address localhost” from the command solve my problem means following command is ok

ionic run android -c -s -l

Thx for the tips.

Quite funny, since adding that parameter, let me run my App in the iOS debugger respectively in case of iOS was a must.

1 Like