[英]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...
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.
First, make sure to follow the official documentation step by step to install and set up Android SDK for Windows (Maybe uninstall first everything from before to remove any kind of conflict that exist).首先,确保按照官方文档一步一步安装和设置 Android SDK for Windows (可能先卸载之前的所有内容以消除存在的任何类型的冲突)。 Also, don't install the
Command line tools only
and include it to PATH
(Remove every related Android SDK PATH
or even other environment variables that are still there too).此外,不要
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
. 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
.
Second, make sure you restart the command prompt for the changes to take effect.其次,确保重新启动命令提示符以使更改生效。 For example, changing
PATH
doesn't update the running processes.例如,更改
PATH
不会更新正在运行的进程。 So, just restart the ones that need the new configurations.因此,只需重新启动需要新配置的那些。 Sometimes even restart the entire system so every process has the updated configurations.
有时甚至重新启动整个系统,以便每个进程都有更新的配置。
And then try again to accept the licenses:然后再次尝试接受许可证:
flutter doctor --android-licenses
I found the solution to my problem stated above, the android sdkmanager.bat file was getting deleted automatically by an antivirus named "SAntivirus".我找到了上述问题的解决方案,android sdkmanager.bat 文件被名为“SAntivirus”的防病毒软件自动删除。 I uninstalled the file from my program files and it worked.
我从我的程序文件中卸载了该文件并且它有效。 Now my flutter doctor is working fine and accepted all the licenses.
现在我的 flutter 医生工作正常并接受了所有许可证。 Thank you all for your support.
谢谢大家的支持。
you should install the android sdk command line tools in sdk tools on your android studio ( uncheck the hid obselute pacakges ).您应该在 android 工作室的 sdk 工具中安装 android sdk 命令行工具(取消选中)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.