簡體   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