Flutter Webプロジェクトを構築していて、firebaseを介してログインページを表示した後、flutter run -d chromeを実行しました。しかし、ブラウザへの接続を試行している間にスタックし、エラーメッセージを表示せずに無限の時間を試行しています。ステータスバー:
λ 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:
version: 1.0.0+1
environment:
sdk: ">=2.1.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
firebase: ^5.0.0
firebase_auth:
main関数を追加するのを忘れたため、同じ問題が発生しました
—
maheshmnj
void main() => runApp(MyApp());
lib/main.dart
ためlib/main.web.dart
です。を使用してもflutter run -d chrome -t ./lib/main.web.dart
、アプリはエラーなしでビルドされますが、フラッターはブラウザーに接続しません