Flutter安装 Android license status unknown 解决方案

1. Windows 安装

问题: flutter doctor 提示错误信息

PS D:\flutter\demo001> flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, v1.9.1+hotfix.5, on Microsoft Windows [Version 10.0.17763.316], locale zh-CN)
[!] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    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.5)
[√] VS Code (version 1.39.2)
[!] Connected device
    ! No devices available

! Doctor found issues in 2 categories.

问题解决

从报错提示来看,需要添加Android license。
执行命令:

flutter doctor --android-licenses

执行后又抛出以下错误

PS D:\flutter\demo001> flutter doctor --android-licenses
A newer version of the Android SDK is required. To update, run:
C:\Users\Administrator\AppData\Local\Android\sdk\tools\bin\sdkmanager --update

根据提示,输入 C:\Users\Administrator\AppData\Local\Android\sdk\tools\bin\sdkmanager --update 即可

你可能感兴趣的:(Flutter安装 Android license status unknown 解决方案)