简体   繁体   中英

Flutter Android license status unknown

$ flutter doctor

Doctor summary (to see all details, run flutter doctor -v):

[✓] Flutter (Channel stable, v1.2.1, on Linux, locale en_US.UTF-8)

[!] Android toolchain - develop for Android devices (Android SDK version 28.0.3) ✗ Android license status unknown.

[✓] Android Studio (version 3.3)

[!] IntelliJ IDEA Ultimate Edition (version 2018.3)

✗ Flutter plugin not installed; this adds Flutter specific functionality. ✗ Dart plugin not installed; this adds Dart specific functionality.

[!] VS Code (version 1.31.1)

✗ Flutter extension not installed; install from https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[!] Connected device ! No devices available

1. I run $ flutter doctor --android-licenses - It runs SDK manager to accept licenses.

After that, I got some classException that is due to JDK.

2. Downloaded and Installed Java 8 , set path to C:\\Program Files \\Java\\jdk1.8.0_111\\bin.

Problem solved... I got the command from here - 7 Flutter Commands

The solution is

  • Install java with version > = java 8 and update JAVA_HOME
  • $ flutter doctor --android-licenses and enter Y when is asked

It worked for me!

Its worked me..

So here the solution, open your SDK manager then uncheck Hide Obsolete Packages

Refer-- https://robbinespu.gitlab.io/blog/2020/03/03/flutter-issue-fixed-android-license-status-unknown-on-windows/

refer---if needed we can download package manually here https://dl.google.com/android/repository/sdk-tools-windows-4333796.zip (for Windows user). Hope this tutorial help people who looking for solution

在此处输入图片说明

Now you'll see Android SDK Tools (Obsolete) 26.1.1 appears. Tick that package and hit apply button then ok button. it will download sdk. then restart Android studio

Nice, now if you run flutter doctor , you should get positive result as below

PS D:\Workplace\flutter_projects> flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, v1.12.13+hotfix.8, on Microsoft Windows [Version 10.0.18363.657], locale en-MY)

[√] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
[√] Android Studio (version 3.6)
[√] VS Code (version 1.42.1)
[√] Connected device (1 available)

• No issues found!

PS D:\Workplace\flutter_projects> flutter doctor --android-licenses -v
All SDK package licenses accepted.======] 100% Computing updates...

Run flutter doctor --android-licenses and enter Y when is asked

if needed we can download package manually here https://dl.google.com/android/repository/sdk-tools-windows-4333796.zip (for Windows user). Hope this tutorial help people who looking for solution

I am using intellij community edition 2021.2 on windows 10. These commands worked for me :

 D:\Software\Android\cmdline-tools\latest\bin\sdkmanager.bat --licenses
 D:\Software\Android\cmdline-tools\latest\bin\sdkmanager.bat --update
 D:\Software\Android\cmdline-tools\latest\bin\sdkmanager  --licenses 

Now run

flutter doctor -v

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM