繁体   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