运行flutter doctor报错
D:\AndroidStudio\projectLocations>flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 2.8.1, on Microsoft Windows [Version 10.0.19044.1415], locale zh-CN)
[!] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
X cmdline-tools component is missing
Run `path/to/sdkmanager --install "cmdline-tools;latest"`
See https://developer.android.com/studio/command-line for more details.
X Android license status unknown.
Run `flutter doctor --android-licenses` to accept the SDK licenses.
See https://flutter.dev/docs/get-started/install/windows
[√] Chrome - develop for the web
[√] Android Studio (version 2020.3)
[√] Connected device (3 available)
解决方法: 1.安装 Android SDK command-linn tootls 2.再次运行flutter doctor ,结果如下:
D:\AndroidStudio\projectLocations>flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 2.8.1, on Microsoft Windows [Version 10.0.19044.1415], locale zh-CN)
[!] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses
[√] Chrome - develop for the web
[√] Android Studio (version 2020.3)
[√] Connected device (3 available)
! Doctor found issues in 1 category.
3.按照提示,运行flutter doctor --android-licenses ,然后一路输入y 确认即可. 4.再次运行flutter doctor ,结果如下:
|