Everything works well until yesterday morning, the UnitTest step
is failed, even it's passed in my local machine with same command ./gradlew testDevelopDebugUnitTest
.
I try to add --debug
option to the command in CircleCI config
, the logs are below (I removed some of logs):
10:01:55.996 [DEBUG] [ComponentAttributeMatcher] Selected match org.jdom:jdom2:2.0.6 configuration runtime from candidates [org.jdom:jdom2:2.0.6 configuration runtime] for {org.gradle.dependency.bundling=external, org.gradle.jvm.version=11, org.gradle.usage=java-runtime}
10:01:55.996 [DEBUG] [ComponentAttributeMatcher] Selected match commons-logging:commons-logging:1.2 configuration runtime from candidates [commons-logging:commons-logging:1.2 configuration runtime] for {org.gradle.dependency.bundling=external, org.gradle.jvm.version=11, org.gradle.usage=java-runtime}
10:01:55.996 [DEBUG] [ComponentAttributeMatcher] Selected match commons-codec:commons-codec:1.10 configuration runtime from candidates [commons-codec:commons-codec:1.10 configuration runtime] for {org.gradle.dependency.bundling=external, org.gradle.jvm.version=11, org.gradle.usage=java-runtime}
10:01:55.996 [DEBUG] [ComponentAttributeMatcher] Selected match org.apache.commons:commons-compress:1.12 configuration runtime from candidates [org.apache.commons:commons-compress:1.12 configuration runtime] for {org.gradle.dependency.bundling=external, org.gradle.jvm.version=11, org.gradle.usage=java-runtime}
//.... many debug logs
10:01:56.611 [ERROR] [BuildExceptionReporter]
10:01:56.612 [ERROR] [BuildExceptionReporter] FAILURE: Build failed with an exception.
10:01:56.612 [ERROR] [BuildExceptionReporter]
10:01:56.612 [ERROR] [BuildExceptionReporter] * What went wrong:
10:01:56.612 [ERROR] [BuildExceptionReporter] Execution failed for task ':app:kaptDevelopDebugKotlin'.
10:01:56.612 [ERROR] [BuildExceptionReporter] > A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptExecution
10:01:56.612 [ERROR] [BuildExceptionReporter] > java.lang.reflect.InvocationTargetException (no error message)
10:01:56.612 [ERROR] [BuildExceptionReporter]
10:01:56.612 [ERROR] [BuildExceptionReporter] * Try:
10:01:56.612 [ERROR] [BuildExceptionReporter] Run with --scan to get full insights.
10:01:56.613 [ERROR] [BuildExceptionReporter]
10:01:56.613 [ERROR] [BuildExceptionReporter] * Exception is:
10:01:56.613 [ERROR] [BuildExceptionReporter] org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:kaptDevelopDebugKotlin'.
10:01:56.614 [ERROR] [BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$3.accept(ExecuteActionsTaskExecuter.java:151)
10:01:56.614 [ERROR] [BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$3.accept(ExecuteActionsTaskExecuter.java:148)
10:01:56.614 [ERROR] [BuildExceptionReporter] at org.gradle.internal.Try$Failure.ifSuccessfulOrElse(Try.java:191)
10:01:56.614 [ERROR] [BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:141)
10:01:56.614 [ERROR] [BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ResolveBeforeExecutionStateTaskExecuter.execute(ResolveBeforeExecutionStateTaskExecuter.java:75)
10:01:56.614 [ERROR] [BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:62)
10:01:56.614 [ERROR] [BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:108)
10:01:56.614 [ERROR] [BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ResolveBeforeExecutionOutputsTaskExecuter.execute(ResolveBeforeExecutionOutputsTaskExecuter.java:67)
10:01:56.615 [ERROR] [BuildExceptionReporter] at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
10:01:56.615 [ERROR] [BuildExceptionReporter] at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
10:01:56.615 [ERROR] [BuildExceptionReporter] at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
10:01:56.615 [ERROR] [BuildExceptionReporter] Caused by: org.gradle.workers.internal.DefaultWorkerExecutor$WorkExecutionException: A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptExecution
10:01:56.615 [ERROR] [BuildExceptionReporter] at org.gradle.workers.internal.DefaultWorkerExecutor$WorkerExecution.waitForCompletion(DefaultWorkerExecutor.java:285)
10:01:56.615 [ERROR] [BuildExceptionReporter] at org.gradle.internal.work.DefaultAsyncWorkTracker.waitForItemsAndGatherFailures(DefaultAsyncWorkTracker.java:115)
10:01:56.615 [ERROR] [BuildExceptionReporter] at org.gradle.internal.work.DefaultAsyncWorkTracker.access$000(DefaultAsyncWorkTracker.java:34)
10:01:56.615 [ERROR] [BuildExceptionReporter] at org.gradle.internal.work.DefaultAsyncWorkTracker$2.run(DefaultAsyncWorkTracker.java:83)
10:01:56.615 [ERROR] [BuildExceptionReporter] at org.gradle.internal.Factories$1.create(Factories.java:25)
10:01:56.615 [ERROR] [BuildExceptionReporter] at org.gradle.internal.work.DefaultWorkerLeaseService.withoutLocks(DefaultWorkerLeaseService.java:254)
10:01:56.617 [ERROR] [BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:120)
10:01:56.617 [ERROR] [BuildExceptionReporter] ... 35 more
10:01:56.617 [ERROR] [BuildExceptionReporter] Caused by: java.lang.reflect.InvocationTargetException
10:01:56.617 [ERROR] [BuildExceptionReporter] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
10:01:56.617 [ERROR] [BuildExceptionReporter] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
10:01:56.617 [ERROR] [BuildExceptionReporter] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
10:01:56.617 [ERROR] [BuildExceptionReporter] at org.jetbrains.kotlin.gradle.internal.KaptExecution.run(KaptWithoutKotlincTask.kt:158)
10:01:56.617 [ERROR] [BuildExceptionReporter] at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.runExecution(DefaultConditionalExecutionQueue.java:215)
10:01:56.618 [ERROR] [BuildExceptionReporter] at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.runBatch(DefaultConditionalExecutionQueue.java:164)
10:01:56.618 [ERROR] [BuildExceptionReporter] at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.run(DefaultConditionalExecutionQueue.java:131)
10:01:56.618 [ERROR] [BuildExceptionReporter] ... 3 more
10:01:56.618 [ERROR] [BuildExceptionReporter] Caused by: java.util.ServiceConfigurationError: javax.annotation.processing.Processor: android.databinding.annotationprocessor.ProcessDataBinding Unable to get public no-arg constructor
10:01:56.618 [ERROR] [BuildExceptionReporter] at kotlin.collections.CollectionsKt___CollectionsKt.toCollection(_Collections.kt:1200)
10:01:56.618 [ERROR] [BuildExceptionReporter] at kotlin.collections.CollectionsKt___CollectionsKt.toMutableList(_Collections.kt:1233)
10:01:56.618 [ERROR] [BuildExceptionReporter] at kotlin.collections.CollectionsKt___CollectionsKt.toList(_Collections.kt:1224)
10:01:56.618 [ERROR] [BuildExceptionReporter] at org.jetbrains.kotlin.kapt3.base.ProcessorLoader.doLoadProcessors(ProcessorLoader.kt:80)
10:01:56.618 [ERROR] [BuildExceptionReporter] at org.jetbrains.kotlin.kapt3.base.ProcessorLoader.loadProcessors(ProcessorLoader.kt:45)
10:01:56.618 [ERROR] [BuildExceptionReporter] at org.jetbrains.kotlin.kapt3.base.Kapt.kapt(Kapt.kt:42)
10:01:56.618 [ERROR] [BuildExceptionReporter] ... 25 more
10:01:56.618 [ERROR] [BuildExceptionReporter] Caused by: java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException
10:01:56.618 [ERROR] [BuildExceptionReporter] ... 31 more
10:01:56.618 [ERROR] [BuildExceptionReporter] Caused by: java.lang.ClassNotFoundException: javax.xml.bind.JAXBException
10:01:56.618 [ERROR] [BuildExceptionReporter] ... 31 more
10:01:56.618 [ERROR] [BuildExceptionReporter]
10:01:56.618 [ERROR] [BuildExceptionReporter]
10:01:56.618 [ERROR] [BuildExceptionReporter] * Get more help at https://help.gradle.org
I am now stuck with this issue, my guess is the jvm version: org.gradle.jvm.version=11
is incorrect (you can see in debug log). My local machine is run with
Matching Java Virtual Machines (1): 1.8.0_222, x86_64
Am I correct? Because in CircleCI docs The CircleCI Android image is based on the openjdk:8-jdk official Docker image
.
How can I set the CircleCI
run the same version with my local machine?
The Android image has moved to Java v11.
Please see this thread on CircleCi Discuss.