Software⏱️ 2 min read📅 2026-05-31

How to Fix: Flutter Doctor --android-licenses : Exception in thread "main" java.lang.NoClassDefFoundError

Flutter Doctor error with NoClassDefFoundError caused by missing XML schema annotation library.

Quick Answer: Update the Android SDK to fix the issue by running "flutter doctor --android-licenses" again after installing the latest version.

Flutter Doctor --android-licenses error can be resolved by updating the Android SDK version and Android Studio.

🛠️ Step-by-Step Verified Fixes

Method 1: Update Android SDK and Android Studio

  1. Step 1: Open Android Studio and go to File > Sdk Manager.

Method 2: Update Android SDK using the Command Line

  1. Step 1: Open a terminal or command prompt and navigate to the directory where you installed the Android SDK.

Method 2 (continued):

  1. Step 2: Run the following command to update the Android SDK: flutter doctor --android-licenses --update-sdk

💡 Conclusion

By following these steps, you should be able to resolve the NoClassDefFoundError and successfully install Flutter.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions