首先,问题描述:

flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, v1.5.4-hotfix.2, on Microsoft Windows [Version 10.0.17134.765],
    locale zh-CN)
[!] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    X Android license status unknown.
      Try re-installing or updating your Android SDK Manager.
      See https://developer.android.com/studio/#downloads or visit
      https://flutter.dev/setup/#android-setup for detailed instructions.
[√] Android Studio (version 3.2)
[√] VS Code (version 1.34.0)
[!] Connected device
    ! No devices available

! Doctor found issues in 2 categories.

解决办法:

1、 Android SDK version 28

Android Studio -> SDK Manager -> SDK Platforms tab -> 选择 Android 9.0 Pie 并安装

2、Android BuildTools version 28.0.3

Android Studio -> SDK Manager -> SDK Tools tab -> 选择右下角 Show Package Details -> 在 Android SDK Build-Tools 里选择 28.0.3 并下载

然后重启Android studio,再在cmd里输入命令即可


参考链接:https://juejin.im/post/5d8c7be5f265da5b8305db5b
01-26 08:56