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
Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema
https://128mots.com/index.php/2021/02/15/implementation-des-graphes-en-python/

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

Install Android Command line tools

Little guide to setup android sdk from homebrew and install Android Command line tools

install Android Command line tools

macOS(via Homebrew)

 brew install --cask android-sdk

Test the installation of android SDK

 sdkmanager --help 

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

https://128mots.com/index.php/2021/02/15/implementation-des-graphes-en-python/