Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.4k views
in Technique[技术] by (71.8m points)

flutter doctor --android-licenses does not work

when I run flutter doctor I noticed license status is unknown.

[√] 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.

I found that in order to resolve the license I need to run this command flutter doctor --android-licenses. when I run that I get the following error:

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:UsersmyusernameAppDataLocalAndroidsdkoolsinsdkmanager --update

So I then tried running C:UsersmyusernameAppDataLocalAndroidsdkoolsinsdkmanager --update I received the below error:

'EAppDataLocalAndroidSdkoolsin' 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

I looked everywhere online and could not find any answer. I am new to flutter and do not know how to resolve this problem. Any help would be great thanks!

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

In Android Studio, you should check to ensure that the Android SDK Command-line Tools are installed. Adding this fixed the issue for me in Flutter.

android studio setttings


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...