Flutter Doctor --android-licenses : Exception in thread "main" java.lang.NoClassDefFoundError [duplicate]
Solution 1:
Installing Android SDK Command-line tools from Android SDK Manager did the job for me.
- Open Android Studio
- Tools > SDK Manager
- From the left choose, Appearance & Behavior > System Settings > Android SDK
- Select SDK Tools from the top menu
- Check Android SDK Command-line tools and click 'apply'.
Solution 2:
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 this in Android Studio--> Setting(Appearance & Behavior) -> Android SDK -> check and download Android SDK Command-line tools.
restart terminal and try again with flutter doctor --android-licenses
--> this should do the work.