A simple hello world ionic 3 app working perfectly fine on ionic serve command in browser but when I run it using any of the following commands i am getting an error of “Couldn’t connect to the server. (http://localhost:8080/)”:
ionic cordova run android
ionic cordova run android (with liverelad)
I have also done
<content src="index.html" /> <access origin="*" /> <allow-intent href="http://*/*" /> <allow-intent href="https://*/*" />
removed and added again whitelist and webview (also removed permanently) plugins also removed and added back the android platform.
Also disabled the firewall. Already on same network / wifi (both mobile and pc).
I have searched each and every forum / website pertinent to this error and also tried all the solutions but none of them worked.
I am using genymotion emulator but getting same error on that.
ionic (Ionic CLI) : 4.0.1 (C:\Users\PC\AppData\Roaming\npm\node_modules\ionic)
Ionic Framework : ionic-angular 3.9.2
@ionic/app-scripts : 3.1.11
cordova (Cordova CLI) : 8.0.0
Cordova Platforms : android 7.0.0
Android SDK Tools : 26.1.1
NodeJS : v8.11.3 (C:\Program Files\nodejs\node.exe)
npm : 4.0.0
OS : Windows 7
ANDROID_HOME : C:\Users\PC\AppData\Local\Android\Sdk
ionic cordova plugins
-> cordova plugin ls
cordova-plugin-device 2.0.2 “Device”
cordova-plugin-ionic-keyboard 2.1.2 “cordova-plugin-ionic-keyboard”
cordova-plugin-ionic-webview 2.0.2 “cordova-plugin-ionic-webview”
cordova-plugin-splashscreen 5.0.2 “Splashscreen”
cordova-plugin-whitelist 1.3.3 “Whitelist”
Please help me to solve this problem. Positive response highly appreciated.