gpt4 book ai didi

android - ionic 模拟 android ERR_CONNECTION_REFUSED localhost :8100

转载 作者:塔克拉玛干 更新时间:2023-11-03 00:45:36 26 4
gpt4 key购买 nike

我尝试在 Android 上模拟我的 Ionic 应用程序。一旦我的应用程序在模拟设备中启动,它就会中断并出现以下错误:

Application Error

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

还有

Webpage not available

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

在浏览器和 iOS 调试器中调试同一个项目就像一个魅力。

cordova-plugin-whitelist 已经安装,我的 config.xml 中有以下规则

<allow-navigation href="http://localhost*"/>

如有任何帮助,我们将不胜感激。

最佳答案

我找到了解决方案,我正在运行命令

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

从命令中删除 --address localhost 解决了我的问题意味着可以使用以下命令

ionic run android -c -s -l

很有趣,既然添加了那个参数,让我分别在 iOS 调试器中运行我的应用程序,以防 iOS 是必须的。

关于android - ionic 模拟 android ERR_CONNECTION_REFUSED localhost :8100,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37549205/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com