flutter doctor出错cmdline-tools component is missing和Android license status unknown

终端(命令行)执行flutter doctor出错,如下图

截图

出现错误的原因可能是安装的android studio没有安装Android SDK Command-line Tools,如下图,打开Android Studio -> Preferences,勾选Android SDK Command-line Tools(latest),点击ok安装
截屏2022-05-18 19.40.43.png

安装成功后,终端运行flutter doctor --android-licenses,不出意外应该就能解决报错问题

你可能感兴趣的:(flutter doctor出错cmdline-tools component is missing和Android license status unknown)