我最近在我的应用中升级了我的 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/