Flutter Doctor --android-licenses : Exception in thread "main" java.lang.NoClassDefFoundError [duplicate] Flutter Doctor --android-licenses : Exception in thread "main" java.lang.NoClassDefFoundError [duplicate] flutter flutter

Flutter Doctor --android-licenses : Exception in thread "main" java.lang.NoClassDefFoundError [duplicate]


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

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

enter image description here


Firstly check for your JAVA_HOME path under System Variables it should be like -->

C:\Program Files\Java\jdk-15.0.2
(no semi-colon and no \bin)

and add to path (in System Variables)-->%JAVA_HOME%\bin

if still, you are getting any error try thisin Android Studio--> Setting(Appearance & Behavior) -> Android SDK -> check and download Android SDK Command-line tools.

restart terminal and try again withflutter doctor --android-licenses

--> this should do the work.


I got same problem.

Just install Android Studio, then problem gone.