连接服务协议时出错:异常:尝试连接Dart天文台5次,所有尝试均失败。放弃。该网址为

时间:2019-01-10 09:02:13

标签: service error-handling dart flutter apk

我的应用程序启动但由于错误而停止。我正在使用Windows 10,Android Studio作为IDE,并尝试构建一个Android应用。

如果我在Android Studio之外使用终端,则可以使用,因此应该与android studio相关。

控制台:

Launching lib\main.dart on Android SDK built for x86 in debug mode...
Initializing gradle...
Resolving dependencies...
Gradle task 'assembleDebug'...
Built build\app\outputs\apk\debug\app-debug.apk.
Installing build\app\outputs\apk\app.apk...
Error connecting to the service protocol: Exception: Attempted to connect to 
Dart observatory 5 times, and all attempts failed. Giving up. The URL was 
ws://127.0.0.1:50997/ws

颤振医生:

Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, v1.0.0, on Microsoft Windows [Version 
10.0.16299.847], locale de-DE)
[!] Android toolchain - develop for Android devices (Android SDK 28.0.3)
X Android license status unknown.
[√] Android Studio (version 3.2)
[√] Connected device (1 available)

! Doctor found issues in 1 category.

1 个答案:

答案 0 :(得分:0)

如果您已配置代理, 确保您还设置了环境变量

NO_PROXY=127.0.0.1