离子4网:: ERR_CONNECTION_REFUSED(http://localhost/) [英] Ionic 4 net::ERR_CONNECTION_REFUSED(http://localhost/)
问题描述
我遇到一个问题,当我尝试创建基于Ionic 4但基于网络的移动前端应用程序时:ERR_CONNECTION_REFUSED( http ://localhost/)会在我在android studio模拟器上使用cordova运行时显示. 这就是我正在使用的
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
我的config.xml
My config.xml
推荐答案
对于其他可能会失去使用电容器的人,请进入您的capacitor.config.json
文件并删除该文件:
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"
}
我已经有一段时间在配置文件中使用它了,直到现在才开始引起问题,所以我不确定新的Capacitor补丁是否改变了产品构建中的这种行为,或者这是否解决了我的问题.上帝向你其余的人飞速前进.
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.
这篇关于离子4网:: ERR_CONNECTION_REFUSED(http://localhost/)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!