簡體   English   中英

運行“flutter doctor --android-licenses”時出錯

[英]error while running "flutter doctor --android-licenses"

$ flutter doctor --android-licenses
Error: Could not find or load main class Pandey\AppData\Local\Android\Sdk\cmdline-tools\latest\bin\..
Caused by: java.lang.ClassNotFoundException: Pandey\AppData\Local\Android\Sdk\cmdline-tools\latest\bin\//

安裝 android SDK 命令行工具后出現此錯誤。

說明你的java沒有安裝或者版本不對

安裝Java SE 16並設置PATH 變量[在 Windows 中]。

  • 正確安裝並設置好路徑后,在新終端運行C:\Users\__\local\Android\sdk\tools\bin\sdkmanager –update命令即可。
  • 重新運行 flutter doctor,可以看到它說要運行命令flutter doctor –android-licenses 所以在終端中運行flutter doctor –android-licenses並在詢問時按y

Go 到您的 android 工作室 打開 SDK 管理器並安裝“Android SDK 命令行工具”或更新(如果不是)。

*這應該可以解決問題

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM