简体   繁体   中英

Flutter doctor error -cmdline tools component missing and Android sdkmanager tool not found. Windows

I'm trying to setup an android emulator but I don't have intel. I've been through so many similar pages but none have given me an answer on why I can't get my flutter doctor to work. Here is my flutter doctor results:

C:\Users\icetr>flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 2.10.4, on Microsoft Windows [Version 10.0.19044.1645], locale en-US)
[!] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    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
[√] Visual Studio - develop for Windows (Visual Studio Community 2022 17.1.4)
[√] Android Studio (version 2021.1)
[√] VS Code (version 1.66.2)
[√] Connected device (3 available)
[√] HTTP Host Availability

! Doctor found issues in 1 category.

C:\Users\icetr>flutter doctor --android-licenses
Android sdkmanager not found. Update to the latest Android SDK and ensure that the cmdline-tools are installed to
resolve this.

Here is my android sdk folder: 在此处输入图像描述

And my cmdline tools folder:

在此处输入图像描述

Inside the lastest folder:

在此处输入图像描述

Inside the bin folder:

在此处输入图像描述

Here's my paths:

在此处输入图像描述

Here's my Android Studio SDK Tools tab:

在此处输入图像描述

If anyone needs anymore information just ask.

Install NDK Manager and android command-line tool from android Studio. Also, accept the android licenses.

flutter doctor --android-licenses

After ALOT of trial an error, I had to finally delete all my android packages, Uninstaller Android Studio, and reinstall. Then I deleted all my paths, and reput them in and it fixed it all.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM