Ionic 4 net::ERR_CONNECTION_REFUSED(http://localhost/)

喜欢而已 提交于 2020-04-14 07:03:38

问题


I'm facing a problem that when I try to create mobile Front-End application based on Ionic 4 but a net:ERR_CONNECTION_REFUSED(http://localhost/) show up when I run it with cordova on android studio emulator. This what i m using

Angular CLI: 7.1.4
Node: 8.9.4
OS: win32 x64
Ionic version   4.5.0

My config.xml

config.xml


回答1:


For anyone else losing their mind that might be using Capacitor go into your capacitor.config.json file and remove this:

"server": {
    "url": "http://localhost:8100"
}

I've had this in my config file for sometime and only just now started causing issues so I'm not sure if a new Capacitor patch has changed this behavior on prod builds or what but this resolved my issue. God speed to the rest of you.



来源:https://stackoverflow.com/questions/54525558/ionic-4-neterr-connection-refusedhttp-localhost

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!