首页 > 解决方案 > Jenkins Android jobs with Gradle error, Jacoco debugging

问题描述

I have some jobs in Jenkins were we run graddle projects and they have some jacoco reports. Sometimes they fail sometimes they don't. These are the errors:

17:47:41    at org.jacoco.core.JaCoCo.<clinit>(JaCoCo.java:31)
17:47:41    ... 30 more
17:47:41 Caused by: java.lang.NullPointerException: Inflater has been closed
17:47:41    ... 31 more

What went wrong:
 Execution failed for task ':tv-natgeotv:jacocoAndroidTvQaNonSecureDebug'.> Multiple task action failures occurred:
 > A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
 > java.lang.ExceptionInInitializerError (no error message)
 > A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
 > java.lang.ExceptionInInitializerError (no error message)

* What went wrong:

Execution failed for task ':tv-natgeotv:jacocoAndroidTvQaNonSecureDebug'.

> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade

   > java.lang.ExceptionInInitializerError (no error message)

in Jenkins I have disableConcurrentBuilds disabled and each job runs in a separate docker container so the mem usage in docker looks good.

标签: javaandroidjenkinsgradlejacoco

解决方案


android.forceJacocoOutOfProcess=trueAGP 3.5+ 添加到 gradle.properties 似乎已经为我修复了它。


推荐阅读