繁体   English   中英

Android Sdk manager not found- Flutter doctor error

[英]Android Sdk manager not found- Flutter doctor error

I installed flutter and it was working fine but after updating it to recent version, flutter is not able to find the android sdk manager. I've tried running flutter doctor and tried to install android licenses but the error "Android Sdkmanager not found is shown". I've attached the image of my command prompt here.

Here's what I've already tried but didn't worked...

  1. I had cmd tools installed in my android studio, so I uninstalled and reinstalled it.
  2. Changed path settings, added my sdk path to environment variables.
  3. Also added cmd tool path to system variables.
  4. Deleting the cmd tools and downloading it from android studio official site and pasting it into the sdk manager folder.
  5. Changing the sdk path to the sdk manager folder path in command prompt.
  6. Running command prompt as administrator.

I've attached the image of command prompt with 'flutter doctor -v' here

I've tried almost everything I found on google but nothing seems to solve my problem. I don't know what should I do next and I'm stuck in it from two days.

Here's the flutter doctor --android-licenses -v image

Please help, Thanks.

首先,确保按照官方文档一步一步安装和设置 Android SDK for Windows (可能先卸载之前的所有内容以消除存在的任何类型的冲突)。 此外,不要Command line tools only并将其包含在PATH中(删除所有相关的 Android SDK PATH甚至其他仍然存在的环境变量)。 The recommended way is inside the Android Studio in Preferences -> Appearance & Behavior -> System Settings -> Android SDK -> SDK Tools and select Android SDK Command-line Tools .

在此处输入图像描述

其次,确保重新启动命令提示符以使更改生效。 例如,更改PATH不会更新正在运行的进程。 因此,只需重新启动需要新配置的那些。 有时甚至重新启动整个系统,以便每个进程都有更新的配置。

然后再次尝试接受许可证:

 flutter doctor --android-licenses

我找到了上述问题的解决方案,android sdkmanager.bat 文件被名为“SAntivirus”的防病毒软件自动删除。 我从我的程序文件中卸载了该文件并且它有效。 现在我的 flutter 医生工作正常并接受了所有许可证。 谢谢大家的支持。

您应该在 android 工作室的 sdk 工具中安装 android sdk 命令行工具(取消选中)。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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