flutter doctor –android-licenses gives a java error

Installing Android SDK Command-line tools from Android SDK Manager did the job for me.

  1. Open Tools > SDK Manager
  2. From the left choose, Appearance & Behavior > System Settings > Android SDK
  3. Select SDK Tools from the top menu
  4. Check Android SDK Command-line tools and click ‘apply’.

Alternative to step #1: WINDOWS: File > Settings (Ctrl+Alt+S) / MAC : Android Studio > Preferences

This fix works for Windows, Linux and Mac OS X.


enter image description here

If you are facing a problem in spite of the above steps, you can try upgrading your system to JDK 8. Official documentation of upgrading to JDK 8 is available here.

Leave a Comment