2017-10-17 95 views
0

我有一個問題從已部署的artifactory庫中檢索AAR傳遞依賴項。Maven AAR傳遞依賴關係 - >錯誤

這裏的build.gradle

dependencies { 
    implementation "x.y.z:B:1.0.0" 
} 

x.y.x:B:1.0.0POM文件,我有這樣的配置:

<dependency> 
    <groupId>x.y.z</groupId> 
    <artifactId>A</artifactId> 
    <version>1.0.0</version> 
    <type>aar</type> 
    <optional>false</optional> 
</dependency> 

但是我有一個搖籃錯誤,因爲它搜索.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 

此外,庫中只包含Maven的一個.aar & .pom文件。

信息:所有這些庫都在同一私人行家artifactory的。

回答

0

我找到了解決辦法。如果您遇到同樣的問題,則解決方案如下。

我想在pom文件的庫中添加此行。

<packaging>aar</packaging>