Android模拟器无法在Local Host服务器和Flutter应用程序之间发送或接收HTTP消息

发布于 2025-02-03 07:19:07 字数 593 浏览 2 评论 0原文

我无法使用Android模拟器在我的Localhost服务器和Flutter应用程序之间发送或接收HTTP消息。不要以为这与此有关 - 但是我正在使用GraphQl进行消息。为了记录:它必须是一个模拟器问题,因为WebApp(也在Localhost上运行)起作用。因此,通常它运行良好。

我尝试了以下方法:

  • 使用'http://10.0.2.2:3000/appdata/apdata/apiv2'
  • 使用'http:// localhost:3000/appdata/apiv2' with With ADB反向TCP:3000 TCP:3000
  • 让防火墙尝试
  • 拼命
  • 使用扩展控件 - >设置 - >代理使用Android Studio HTTP代理设置,或不使用代理和手动代理配置(也许我在这里没有找到正确的代理配置,但实际上我认为代理配置可以帮助我 - 也许我是错的))

我很迫切,需要您的帮助:)我还能做什么?使用10.0.2.2 IP地址,所有其他带有该问题的Stackoverflow问题都很高兴。

I am not able to send or receive http messages between my localhost server and my flutter app using the android emulator. Don't think that this has anything to do with it - but I am using graphql for the messages. For the record: it must be an emulator problem as the webapp (which is also running on localhost) works. So generally it works well.

I tried the following:

  • using 'http://10.0.2.2:3000/appdata/apiv2'
  • using 'http://localhost:3000/appdata/apiv2' with adb reverse tcp:3000 tcp:3000
  • Putting Firewall off
  • Trying older and newer android versions
  • Desperately playing around with the Extended Controls -> Settings -> Proxy using android studio http proxy settings, or don't use proxy and also manual proxy configuration (maybe i did not find the right proxy configuration here, but actually I don't think that proxy configurations can help me - maybe I am wrong)

I am desperated and need your help :) what else can I do? All the other stackoverflow questions with that question are just happy using the 10.0.2.2 IP address.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文