Reputation: 42834
I am running the command:
admins-MacBook-Pro:launcher devrath$ ./gradlew assemblerelease
I get the. error as:
> Task :app:compileGalileoReleaseJavaWithJavac FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:compileGalileoReleaseJavaWithJavac'.
> javax/xml/bind/JAXBException
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 1s
22 actionable tasks: 1 executed, 21 up-to-date
I already added These dependencies:
implementation "org.glassfish.jaxb:jaxb-runtime:2.3.2"
implementation "jakarta.xml.bind:jakarta.xml.bind-api:2.3.2"
I am using :
admins-MacBook-Pro:~ devrath$ javac -version
javac 13.0.2
Upvotes: 0
Views: 117
Reputation: 42834
I resolved using below lines in grade
if (JavaVersion.current().ordinal() >= JavaVersion.VERSION_1_9.ordinal()) {
// If you're using @AutoValue or any libs that requires javax.annotation (like Dagger)
compileOnly 'com.github.pengrad:jdk9-deps:1.0'
compileOnly 'javax.annotation:javax.annotation-api:1.3.2'
// If you're using Java
annotationProcessor "com.sun.xml.bind:jaxb-core:2.3.0.1"
annotationProcessor "javax.xml.bind:jaxb-api:2.3.1"
annotationProcessor 'com.sun.xml.bind:jaxb-impl:2.3.2'
testAnnotationProcessor "com.sun.xml.bind:jaxb-core:2.3.0.1"
testAnnotationProcessor "javax.xml.bind:jaxb-api:2.3.1"
implementation "javax.annotation:jsr250-api:1.0"
// If you're using Kotlin
if (project.hasProperty('kapt')) {
kapt 'javax.xml.bind:jaxb-api:2.3.1'
kapt 'com.sun.xml.bind:jaxb-core:2.3.0.1'
kapt 'com.sun.xml.bind:jaxb-impl:2.3.2'
}
}
Upvotes: 1