Funny Boss
Funny Boss

Reputation: 338

Flutter error for Android license status unknown

I tried to run flutter on my Windows 10 and getting some errors. Trying to resolve error " Android license status unknown." from the last couple of hours. But no luck. My system environment is like the followings:

Windows 10, java version "12.0.2" 2019-07-16, Android Studio 3.5.

Can anyone know the thing which I am missing here?

C:\Users\me>flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, v1.7.8+hotfix.4, on Microsoft Windows [Version 10.0.17134.885], locale en-US)

[!] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    X Android license status unknown.
      Try re-installing or updating your Android SDK Manager.
      See https://developer.android.com/studio/#downloads or visit https://flutter.dev/setup/#android-setup for detailed
      instructions.
[!] Android Studio (version 3.5)
    X Flutter plugin not installed; this adds Flutter specific functionality.
    X Dart plugin not installed; this adds Dart specific functionality.
[√] VS Code, 64-bit edition (version 1.37.1)
[!] Connected device
    ! No devices available

! Doctor found issues in 3 categories.

C:\Users\me>

I tried the following command (flutter doctor --android-licenses) and getting the errors like this:

C:\Users\me>flutter doctor --android-licenses
A newer version of the Android SDK is required. To update, run:
C:\Users\me\AppData\Local\Android\sdk\tools\bin\sdkmanager --update



C:\Users\me>

Upvotes: 1

Views: 2006

Answers (4)

D V Yogesh
D V Yogesh

Reputation: 3700

Its worked me..

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

enter image description here

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

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

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

Upvotes: 0

Balaji Ks
Balaji Ks

Reputation: 342

Actually The Android License is not necessary to do. Just open the android studio and start a new flutter project and have fun! If you want to do so. Type the command: flutter doctor --android-licenses Have Fun!

Upvotes: 0

Funny Boss
Funny Boss

Reputation: 338

I solved it. I set JDK_HOME and then run the following command to fix:

flutter doctor --android-licenses

So, basically it was unable to configure JDK home and that error occurred. Hopefully, it will solve issues if you face this error.

Upvotes: 0

iOS
iOS

Reputation: 813

Did you already accepted the licenses? If not, try

flutter doctor --android-licenses

As shown in How to accept Android licenses

Upvotes: 2

Related Questions