Home » Android » Android check with NoClassDefFoundError: javax/xml/bind/JAXBException

Android check with NoClassDefFoundError: javax/xml/bind/JAXBException

Posted by: admin June 15, 2020 Leave a comment

Questions:

I’m trying to run the ./gradlew clean check but I’m facing the following error:

> Task :app:kaptDebugKotlin FAILED
e: java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException
        at java.base/java.lang.Class.getDeclaredConstructors0(Native Method)
        at java.base/java.lang.Class.privateGetDeclaredConstructors(Class.java:3137)
        at java.base/java.lang.Class.getConstructor0(Class.java:3342)
        at java.base/java.lang.Class.newInstance(Class.java:556)
        at org.jetbrains.kotlin.cli.jvm.plugins.ServiceLoaderLite.loadImplementations(ServiceLoaderLite.kt:50)
        at org.jetbrains.kotlin.kapt3.ClasspathBasedKapt3Extension$loadProcessors$efficientProcessorLoader$1.doLoadProcessors(Kapt3Extension.kt:83)
... more ...
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.JAXBException
        at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:471)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)

There’s anything that could be missing on gradle configuration?

How to&Answers:

I uninstall the Java 11 and install the java 8