Flutter花费了很长时间才能连接到浏览器 [英] Flutter taking an unexpectedly long time for connecting to browser
本文介绍了Flutter花费了很长时间才能连接到浏览器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在构建flutter网站项目,并通过firebase设置登录页面后,我运行了flutter run -d chrome。
但是尝试连接浏览器时卡住了,只是尝试了无休止的时间而没有给出任何错误消息。状态栏:
I'm building flutter web project and after implenting login page via firebase I ran flutter run -d chrome. But it's stuck while attempting to connect to browser, its just attempting for endless time without giving any error messages. Status bar:
λ flutter run -d chrome
Launching lib\main.dart on Chrome in debug mode...
Building application for the web... 20,2s
Attempting to connect to browser instance..
(This is taking an unexpectedly long time.) \
颤振医生:
λ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel master, v1.10.11-pre.2, on Microsoft Windows [Version 10.0.18362.356], locale ru-RU)
[X] Android toolchain - develop for Android devices
X Unable to locate Android SDK.
Install Android Studio from: https://developer.android.com/studio/index.html
On first launch it will assist you in installing the Android SDK components.
(or visit https://flutter.dev/setup/#android-setup for detailed instructions).
If the Android SDK has been installed to a custom location, set ANDROID_HOME to that location.
You may also want to add it to your PATH environment variable.
[√] Chrome - develop for the web
[!] Android Studio (not installed)
[√] VS Code (version 1.38.1)
[√] Connected device (2 available)
! Doctor found issues in 2 categories.
pubspec.yaml:
pubspec.yaml:
version: 1.0.0+1
environment:
sdk: ">=2.1.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
firebase: ^5.0.0
firebase_auth:
推荐答案
- 删除所有未使用的依赖项
-
flutter运行-d Web服务器
- Remove all unused dependencies
flutter run -d web-server
@Giampaolo提到的答案是一个很好的解决方法!
The answer mentioned by @Giampaolo is a great workaround!
这篇关于Flutter花费了很长时间才能连接到浏览器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文