【发布时间】:2017-10-19 10:41:21
【问题描述】:
我在从已部署的工件库中检索 AAR 传递依赖项时遇到问题。
这里是 build.gradle:
dependencies {
implementation "x.y.z:B:1.0.0"
}
在x.y.x:B:1.0.0的POM文件中,我有这样的配置:
<dependency>
<groupId>x.y.z</groupId>
<artifactId>A</artifactId>
<version>1.0.0</version>
<type>aar</type>
<optional>false</optional>
</dependency>
但 Gradle 出现错误,因为它搜索 .jar 文件而不是 .aar 文件。我错过了一步吗?
Could not resolve all files for configuration ':sample:debugAndroidTestRuntimeClasspath'.
> Could not find A.jar (x.y.z:A:1.0.0).
Searched in the following locations:
http://.../x/y/z/A/1.2.5/A-1.0.0.jar
此外,库 A 仅包含 Maven 上的 .aar 和 .pom 文件。
信息:所有这些库都在同一个私有 maven 工件中。
【问题讨论】: