flutter doctor --android-licenses 报错:Android sdkmanager tool not found (C:\Users\xxx\AppData\Local\Android\sdk\tools\bin\sdkmanager).


flutter doctor --android-licenses


Android sdkmanager tool not found (C:\Users\xxx\AppData\Local\Android\sdk\tools\bin\sdkmanager).
Try re-installing or updating your Android SDK,
visit https://flutter.dev/setup/#android-setup for detailed instructions.


open Android Studio's SDK Manager go to the Android SDK tab Under SDK Tools, uncheck Hide Obsolete Packages Install Android SDK Tools (Obsolete)


Warning: In Android Studio 3.6 or later, you need to manually add the old version of the Android SDK Tools for Flutter to work.

此外需要注意的是,如果之前修改了 SDK location 需要修改回来,flutter 不会自动识别(不知道为啥)

成功的标识是 C:\Users\xxx\AppData\Local\Android\sdk\tools\bin\sdkmanager 这个路径存在

参考文档: https://github.com/flutter/flutter/issues/20976 https://flutter.dev/docs/get-started/install/windows