Android Studio : cmdline-tools component is missing. Android license status unknown.

运行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#android-setup for more details.
[] Chrome - develop for the web
[] Android Studio (version 2020.3)
[] Connected device (3 available)

解决方法:
1.安装 Android SDK command-linn tootls
Android Studio : cmdline-tools component is missing. Android license status unknown._第1张图片
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确认即可.
Android Studio : cmdline-tools component is missing. Android license status unknown._第2张图片
4.再次运行flutter doctor,结果如下:
Android Studio : cmdline-tools component is missing. Android license status unknown._第3张图片

你可能感兴趣的:(工具报错,android,studio,flutter)