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

查看:1135
本文介绍了如何修复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:在收到完整的标头之前,连接已关闭,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.

推荐答案

现在,此问题已在github上打开 https://github.com/flutter/flutter/issues/32587

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

暂时可以通过切换到物理设备而不是仿真器来解决此问题 如何在真实环境中测试android应用装有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 Target(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天全站免登陆