Failed to install android-sdk: java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema
I had a similar problem this morning (trying to build for Android using Unity3D). I ended up uninstalling JDK9 and installing Java SE Development Kit 8u144. Hope this helps.
brew cask uninstall java
# uninstall java9brew tap homebrew/cask-versions
brew cask install java8
# install java8touch ~/.android/repositories.cfg
# without this file, error will occur on next stepbrew install --cask android-sdk
java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema when accepting SDK licenses
You are using the wrong sdkmanager
, tools
directory has been deprecated
Open Android Studio
and install the latest command-line
tools:
This will create this folder in your Android SDK:
...\Android\Sdk\cmdline-tools\latest\bin
Now use the sdkmanager
which is inside the bin directory to accept all the licenses:
C:\Users\jaspe\AppData\Local\Android\Sdk\cmdline-tools\latest\bin>sdkmanager.bat --licenses
Fix sdkmanager java.lang.NoClassDefFoundError batchfile
You can try this solution
First open sdkmanager.bat
with any text editor
Then find this line
%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %SDKMANAGER_OPTS%
And change it to this line
%JAVA_EXE%" %DEFAULT_JVM_OPTS% --add-modules java.xml.bind %JAVA_OPTS% %SDKMANAGER_OPTS%
I hope this solves your problem.
Not able to accept Android sdk licences 2020
The solution that worked is by forcefully downgrading jdk version to 8 from my current version 14, then repeating the same steps as above.
Exception in thread main java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema
I downgraded to Java 8 and it worked.
Don't know why 15 doesn't work in this case.
Related Topics
Https Get (Ssl) with Android and Self-Signed Server Certificate
Namenode: Java.Net.Bindexception
How to Add a Shortcut Key for a Jbutton in Java
Rotating a Shape Vertically Around the X-Axis
Spring Boot, Spring Data JPA with Multiple Datasources
Drawing a Rectangle That Won't Disappear in Next Paint
Strip Leading and Trailing Spaces from Java String
Where's My Invalid Character (Ora-00911)
How to Update a Textview of an Activity from Another Class
Android - Setting a Timeout for an Asynctask
Java Program That Runs Commands with Linux Terminal
Spring @Transactional - Isolation, Propagation
Lambdas: Local Variables Need Final, Instance Variables Don'T
Java Datetimeformatterbuilder Fails on Testtime
How to Sort a List Alphabetically
Emulate Annotation Inheritance for Interfaces and Methods with Aspectj