Reputation: 181
My Ionic app works fine when running with ionic serve but when i use the command ionic capacitor run android -l
it doesn't hit on sever and gives error
Webpage not available: net::ERR_CONNECTION_REFUSED
I am using the latest Ionic version.
capacitor.config.json
{
"appId": "fire.app.flashlight",
"appName": "Flashlight",
"bundledWebRuntime": false,
"windowsAndroidStudioPath": "C:\\Users\\Digisoft\\Downloads\\Compressed\\android-studio-ide-201.6692364-windows\\android-studio\\bin\\studio64.exe",
"npmClient": "npm",
"webDir": "www",
"plugins": {
"SplashScreen": {
"launchShowDuration": 0
}
},
"cordova": {},
"server": {
"url": "http://localhost:8100",
"cleartext": true
}
}
Upvotes: 1
Views: 2396
Reputation: 90
You trying to reach localhost on emulator but not on remote host. Try to change url to wi-fi network of remote host 192.168.0.* something.
Upvotes: 0