简体   繁体   中英

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.

将 AGP 3.5+ 的android.forceJacocoOutOfProcess=true添加到 gradle.properties 似乎为我修复了它。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM