如何修复 HttpException:在收到完整标头之前连接已关闭 [英] How to fix HttpException: Connection closed before full header was received

查看:56
本文介绍了如何修复 HttpException:在收到完整标头之前连接已关闭的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近在我的应用中升级了我的 Flutter 版本.但是当我想调试应用程序时,它显示了以下错误.

I have recently upgraded my flutter version in my app. But when I want to debug the application, it shows me the following error.

连接到服务协议时出错:HttpException: Connection closed before full header was received, URI = http://127.0.0.1:50795/ws

Error connecting to the service protocol: HttpException: Connection closed before full header was received, URI = http://127.0.0.1:50795/ws

有没有人在升级 flutter 版本后遇到同样的问题?如果有任何解决方法,请分享.

Is there anyone facing the same issue after upgrading the flutter version? If is there any workaround, please share.

推荐答案

现在这个 issue 在 github 上打开https://github.com/flutter/flutter/issues/32587

Right now this issue is opened on github https://github.com/flutter/flutter/issues/32587

暂时你可以通过切换到物理设备而不是模拟器来解决这个问题如何在真实环境中测试安卓应用使用 Android Studio 的设备?

Temporarily you can solve this issue by switching to physical device instead of emulator How to test android apps in a real device with Android Studio?

在 github 上找到的决定(链接向上)

Decision found on github (link upward)

我有一个临时解决办法,现在可以使用.当我将模拟器作为 Pixel 3 Android 9.+ Target (Q API) 运行时,会引发上述异常.我制作了第二个模拟设备,一个 Pixel 2 Android 9.0 目标(28 API),这个目标运行良好.

I've got a temporary work around, which I can use for now. The exception above is thrown when I run the emulator as a Pixel 3 Android 9.+ Target (Q API). I made up a second emulated device, a Pixel 2 Android 9.0 Target (28 API), and this target works fine.

我还注意到 Pixel 2 目标在磁盘上占用 8.5GB,而 Pixel 3 目标仅占用 1.4GB.这让我怀疑 Pixel 3 目标是否遗漏了一些重要的东西.

I'm also noticing that the Pixel 2 target takes up 8.5GB on Disk, while the Pixel 3 target only takes up 1.4GB. It makes me wonder if the Pixel 3 target is missing some important things.

这篇关于如何修复 HttpException:在收到完整标头之前连接已关闭的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆