执行 flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, v1.9.1+hotfix.6, on Microsoft Windows [Version 10.0.18362.418], locale zh-CN)
[!] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses
[!] Android Studio (version 3.5)
X Flutter plugin not installed; this adds Flutter specific functionality.
X Dart plugin not installed; this adds Dart specific functionality.
[!] Proxy Configuration
! NO_PROXY is not set
[!] Connected device
! No devices available
! Doctor found issues in 4 categories.
-
这里提示我们
[!] Android toolchain - develop for Android devices (Android SDK version 29.0.2) ! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses
按提示让我们运行doctor --android-licenses
一直 y 同意
这里提示我们 Flutter 和 Dart 未安装
[!] Android Studio (version 3.5) X Flutter plugin not installed; this adds Flutter specific functionality. X Dart plugin not installed; this adds Dart specific functionality.
我们先设置 Android Studio
路径
我的Android Studio 路径为 D:\Android\Android Studio
命令运行 flutter config --android-studio-dir="D:\Android\Android Studio"
打开 Android Studio 选择安装插件
搜索 Dart
和 Flutter
安装
创建一个项目 并配置一个配置模拟器