簡體   English   中英

顫振醫生 --android-licenses 不起作用

[英]flutter doctor --android-licenses does not work

當我運行flutter doctor我注意到許可證狀態未知。

[√] Flutter (Channel stable, v1.0.0, on Microsoft Windows [Version 10.0.17763.253], locale en-US)
[!] Android toolchain - develop for Android devices (Android SDK 28.0.3)
    X Android license status unknown.
[√] Android Studio (version 3.3)
[√] IntelliJ IDEA Ultimate Edition (version 2018.3)
[!] VS Code (version 1.30.2)
[!] Connected device
    ! No devices available

! Doctor found issues in 3 categories.

我發現為了解決許可證,我需要運行這個命令flutter doctor --android-licenses 當我運行時,出現以下錯誤:

The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
A newer version of the Android SDK is required. To update, run:
C:\Users\myusername\AppData\Local\Android\sdk\tools\bin\sdkmanager --update

所以我然后嘗試運行C:\\Users\\myusername\\AppData\\Local\\Android\\sdk\\tools\\bin\\sdkmanager --update我收到以下錯誤:

'E\AppData\Local\Android\Sdk\tools\bin\' is not recognized as an internal or external command,
operable program or batch file.
Error: Could not find or load main class com.android.sdklib.tool.sdkmanager.SdkManagerCli

我在網上到處找,找不到任何答案。 我是顫振的新手,不知道如何解決這個問題。 任何幫助都會非常感謝!

在 Android Studio 中,您應該檢查以確保安裝了 Android SDK 命令行工具。 添加這個為我在 Flutter 中解決了這個問題。

安卓工作室設置

打開命令提示符並進入 Android SDK 目錄,然后執行上面的命令。

sdkmanager --update

暫無
暫無

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

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