当我在Visual Studio代码中的调试控制台中运行Flutter应用程序时。我收到以下消息
"Launching lib\main.dart on AOSP on IA Emulator in debug mode...
√ Built build\app\outputs\flutter-apk\app-debug.apk.
Connecting to VM Service at ws://127.0.0.1:61843/B4tZiYo4ANE=/ws
I/madra.brew_cre(10170): Background concurrent copying GC freed 28317(6MB)
AllocSpace
objects, 5(96KB) LOS objects, 49% free, 1944KB/3MB, paused 1.286ms total 114.385ms
D/eglCodecCommon(10170): setVertexArrayObject: set vao to 0 (0) 1 0
D/EGL_emulation(10170): eglMakeCurrent: 0xe9586440: ver 2 0 (tinfo 0xd0ce8ff0)"
然后我在socket_patch.dart文件中得到一个错误
"Failed host lookup: '$host'"
但我注意到,当我从终端或Android Studio运行相同的程序时。它成功地构建了,当我在运行时将其限制在一个观察端口时,它也构建得很好。当我在终端和调试控制台上运行时,唯一的区别是当我从终端运行它时,它会自动在不同的端口上运行它。
"Launching lib\main.dart on AOSP on IA Emulator in debug mode...
Running Gradle task 'assembleDebug'... 9.7s
√ Built build\app\outputs\flutter-apk\app-debug.apk.
Syncing files to device AOSP on IA Emulator... 217ms
A Dart VM Service on AOSP on IA Emulator is available at:
http://127.0.0.1:62597/G44aJh3yYYE=/
The Flutter DevTools debugger and profiler on AOSP on IA Emulator is available at:
http://127.0.0.1:9101?uri=http://127.0.0.1:62597/G44aJh3yYYE=/
D/eglCodecCommon(10659): setVertexArrayObject: set vao to 0 (0) 1 0
D/EGL_emulation(10659): eglMakeCurrent: 0xd67fd2e0: ver 2 0 (tinfo 0xe7b2ac70)"
我想我可能有代理设置或http/https环境变量设置,导致这种行为,但我的系统设置为自动检测代理设置。
1条答案
按热度按时间cgyqldqp1#
我有同样的问题,并做了它的工作返回与以前的 dart 稳定版本,我希望为你工作。