Flutter doctor 提示 Android license status unknown解决方案

在安装完Flutter,运行flutter doctor检测依赖时提示

✗ 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.

搜索网上的解决方案,大都让输入flutter doctor --android-licenses ,但我键入上述命令后,又提示

Android sdkmanager tool not found 
Try re-installing or updating your Android SDK,
    visit https://flutter.dev/setup/#android-setup for detailed instructions.

经排查,原来是最新版本的Android SDK将Android SDK tools包重命名成了Android-SDK command line tools,但是Flutter当前最新的稳定版本并没有兼容该项改动,所以有此提示,解决的方法也简单,只需要安装一个旧版本的Android SDK Tools (Obsolete) 26.1.1即可(取消Hide Obsolete Packages选择框即可见)。

sdk_tools

你可能感兴趣的:(Flutter doctor 提示 Android license status unknown解决方案)