Android SDK Exception in thread “main” java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema

When you try to lauchn the utility sdkmanager for android SDK you get the following error : Exception in thread “main” java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema

How to solve this error ?

Solution is to install JDK 8 :

brew cask uninstall java
brew tap homebrew/cask-versions
brew cask install java8
touch ~/.android/repositories.cfg
brew cask install android-sdk

In some case the right command is :

brew install openjdk@8
https://128mots.com/index.php/2021/02/15/implementation-des-graphes-en-python/

https://formulae.brew.sh/cask/android-sdk

Leave a Reply

Your email address will not be published. Required fields are marked *