java - 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.
解决方案
将android.forceJacocoOutOfProcess=true
AGP 3.5+ 添加到 gradle.properties 似乎已经为我修复了它。
推荐阅读
- ruby-on-rails - 带有分页的Rails复杂过滤器
- java - Java Stream Map 过滤、移除和收集
- c++ - 带有 C++ 的 Mac iOS 上的 VS Code。如何在定制终端中“cout”?
- javascript - 模态不会在按钮和/或窗口单击事件时关闭
- php - MySQL 注入 - 绕过影响列名的字符串过滤器
- javascript - 如何导出 useState 钩子的值
- excel - 使用 VBA 将文本从网站拉入 Excel
- node.js - 如何循环运行 selenium web 抓取脚本并将结果发送到 mongodb
- r - 查找分隔字符串中两个子字符串的字符数
- ios - SwiftUI 拖动、放大和缩放手势组合在一起