flutter - 如何修复 HttpException : Connection closed b

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

连接到服务协议(protocol)时出错:HttpException:在收到完整 header 之前连接已关闭,URI = http://127.0.0.1:50795/ws

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

最佳答案

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

暂时您可以通过切换到物理设备而不是模拟器来解决此问题 How to test android apps in a real device with Android Studio?

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

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.

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.

关于flutter - 如何修复 HttpException : Connection closed before full header was received,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55879550/

相关文章:

dart - PageView : Disable the default scrolling an

listview - 在构建期间调用 setState() 或 markNeedsBuild

dart - Android Studio 3.0.1 上未显示新的 Flutter 项目向导

dart - 如何清除 Flutter 的图片缓存?

android - Flutter 中的字符串 xml 文件

dart - 如何检查当前路线是哪条?

dart - 在 Flutter 中的屏幕之间传递数据

android - 如何构建符合 Google Play 64 位要求的应用程序?

flutter - 如何在 flutter 中为文本添加阴影?

http - Flutter http 包不存在