android - Android lint 在 Gitlab Runner (Docker) 上失败
问题描述
我有一个运行 AndroidlintDevDebug
任务的 Gitlab 运行器(Docker Executor)。Gitlab 运行器在 GCP 上运行。尝试下载时作业失败groovy-all-2.4.15.jar
。我可以wget
在同一个 lint 作业中的 .gitlab-ci.yml 文件中的 jar 文件,并且那里没有连接问题。我在使用jCenter()
获取罐子时遇到了同样的问题。在lineDevDebug
本地机器上没有任何问题。工作中的其他任务在.gitlab-ci-yml
CI 上没有任何问题(例如assembleDebug
等)。任何帮助将不胜感激。
错误是:
> Task :app:lintDevDebug FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:lintDevDebug'.
> Could not resolve all files for configuration ':app:lintClassPath'.
> Could not download groovy-all-2.4.15.jar (org.codehaus.groovy:groovy-all:2.4.15)
> Could not get resource 'https://repo.maven.apache.org/maven2/org/codehaus/groovy/groovy-all/2.4.15/groovy-all-2.4.15.jar'.
> Could not GET 'https://repo.maven.apache.org/maven2/org/codehaus/groovy/groovy-all/2.4.15/groovy-all-2.4.15.jar'.
> Connection reset
这是 .gitlab-ci.yml 文件
image: ghcr.io/alvr/alpine-android:latest-jdk8
before_script:
- chmod +x ./gradlew
stages:
- build
- test
lintDebug:
stage: build
script:
- ./gradlew --info -Pci --console=plain :app:lintDevDebug -PbuildDir=lint
tags:
- android-runner
解决方案
推荐阅读
- .net-core - 如果使用条件目标框架,Nuget 会为错误的目标框架恢复包
- c# - 如何添加列表
该命令在循环 asp.net c# 中被计数的文件路径 - javascript - 如何在 React 中实现依赖/级联下拉选择菜单?
- android - 使用 Android 库 (AAR) 时出现 AndroidRuntime 错误 ClassNotFoundException
- karate - 我可以对 JSON 对象使用 ## 操作吗?
- python - 用特殊字符替换 RTF 文件中的占位符
- angular - 为什么我的“
- excel - 在excel中,如何比较单个单元格中的多个值
- oracle - 来自 Oracle 数据库的连接错误 - Logstash
- javascript - 如何在 Next 应用中缓存动态图像?