flutter报错-cmdline-tools component is missing

安装完androidsdk和android studio后,打开控制台,出现错误
flutter报错-cmdline-tools component is missing_第1张图片
解决办法
flutter报错-cmdline-tools component is missing_第2张图片

flutter报错-cmdline-tools component is missing_第3张图片
找到自己安装android sdk的位置,然后安装上,并将下面的勾选上
flutter报错-cmdline-tools component is missing_第4张图片

再次运行 flutter doctor 不报错,出现以下画面

Doctor summary (to see all details, run flutter doctor -v):
[] Flutter (Channel stable, 2.5.3, on Microsoft Windows [Version 10.0.18363.1916], locale en-US)
[] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
[] Chrome - develop for the web
[] Android Studio (version 4.1)
[] VS Code
[] VS Code, 64-bit edition (version 1.62.0)
[] Connected device (2 available)

• No issues found!

你可能感兴趣的:(flutter,flutter)