简体   繁体   English

Jenkins Android 作业与 Gradle 错误,Jacoco 调试

[英]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.我在 Jenkins 有一些工作,我们运行 graddle 项目,他们有一些 jacoco 报告。 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.在 Jenkins 中,我禁用了 disableConcurrentBuilds,并且每个作业都在单独的 docker 容器中运行,因此 docker 中的 mem 使用看起来不错。

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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