Flutter doctor 错误-缺少 cmdline 工具组件和 Android 未找到 sdkmanager 工具。 Windows

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

我正在尝试设置一个 android 模拟器,但我没有英特尔。我已经浏览了很多类似的页面,但是 none 给了我一个关于为什么我不能让我的 flutter doctor 工作的答案。这是我的 flutter doctor 结果:

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.

这是我的 android sdk 文件夹:

还有我的命令行工具文件夹:

在最新的文件夹中:

bin 文件夹内:

这是我的路径:

这是我的 Android Studio SDK 工具选项卡:

如果有人需要更多信息,请询问。

从 android Studio 安装 NDK 管理器和 android command-line 工具。另外,接受 android 许可。

flutter doctor --android-licenses

经过多次试错,我不得不最终删除所有 android 软件包、Uninstaller Android Studio,然后重新安装。然后我删除了我所有的路径,并重新输入它们并修复了所有问题。