在改变我的项目的build.gradle
使用一个新版本的Gradle插件,它做了一大堆的东西(很难隔离根本原因),我得到以下错误时运行resolveAndLockAll --write-locks
更新项目的锁文件。
Execution failed for task ':resolveAndLockAll'.
> Could not resolve all files for configuration ':allCodeCoverageReportSourceDirectories'.
> Could not resolve com.google.protobuf:protobuf-java:3.15.7.
Required by:
project : > project :my-project
> No matching variant of com.google.protobuf:protobuf-java:3.21.4 was found. The consumer was configured to find a component of category 'verification', and its dependencies declared externally, as well as attribute 'org.gradle.verificationtype' with value 'main-sources' but:
- Variant 'compile' capability com.google.protobuf:protobuf-java:3.21.4:
- Incompatible because this component declares a library and the consumer needed a component of category 'verification'
- Other compatible attributes:
- Doesn't say anything about how its dependencies are found (required its dependencies declared externally)
- Doesn't say anything about org.gradle.verificationtype (required 'main-sources')
- Variant 'enforced-platform-compile' capability com.google.protobuf:protobuf-java-derived-enforced-platform:3.21.4:
- Incompatible because this component declares an enforced platform and the consumer needed a component of category 'verification'
- Other compatible attributes:
- Doesn't say anything about how its dependencies are found (required its dependencies declared externally)
- Doesn't say anything about org.gradle.verificationtype (required 'main-sources')
.
.
.
[TRUNCATED]
我无法理解错误信息实际上是在试图传达什么。
在这个错误消息的上下文中,下列术语是什么意思?:
<- 变种能力/gh>
- 兼容变体能力 <
- 兼容属性/gh><
- 执行平台/gh>消费者
- 类别"验证"组件
- 外部声明的依赖项
这些术语的含义在本使用指南中有介绍:
https://docs.gradle.org/current/userguide/dependency_management_terminology.html