我最近迁移到了 Linux Ubuntu 22.04。我成功安装了 Flutter 和 Android Studio,但是当我尝试运行项目时,它会抛出异常错误。
线程“main”中的异常 java.net.SocketExpection:连接重置
当我运行 时flutter doctor
,HTTP 主机可用性被标记。下面是我的flutter doctor
日志。
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel main, 3.4.0-19.0.pre.295, on Ubuntu 22.04.1 LTS 5.15.0-47-generic, locale en_US.UTF-8)
Checking Android licenses is taking an unexpectedly long time...
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
[✓] Chrome - develop for the web
[✓] Linux toolchain - develop for Linux desktop
[✓] Android Studio (version 2021.2)
[✓] VS Code
[✓] Connected device (3 available)
HTTP Host availability check is taking a long time...
[☠] HTTP Host Availability (the doctor check crashed)
✗ Due to an error, the doctor check did not complete. If the error message below is not helpful, please let us know about this issue at
https://github.com/flutter/flutter/issues.
✗ Exception: HTTP Host Availability exceeded maximum allowed duration of 0:04:30.000000
! Doctor found issues in 1 category.
PS:当我跑步的时候flutter doctor
,我已连接到互联网。