在我们公司,我们已经开始模块化我们的android项目,每个项目都有几个依赖项。 我们使用JFrog artifactory来托管我们的aar文件。 这是代码:
图书馆A:
compile "com.google.firebase:firebase-crash:$googlePlayServices" compile "com.google.firebase:firebase-core:$googlePlayServices" compile "com.squareup.retrofit2:retrofit:$retrofit"以下不起作用。 我也尝试删除“@aar”但仍然没有。 主要项目:
compile ('com.sample.librarya:librarya:0.0.1@aar'){ transitive = true }因此我必须再次向主应用程序添加改装依赖项。
我已经做了很多研究并阅读了很多SO问题,但是没有一个问题可以解决这个问题。 我还在其pom.xml文件中列出了LibraryA的所有依赖项。
At our company, we have started modularizing our android projects and each has several dependencies. We use JFrog artifactory to host our aar files. Here is the code:
Library A:
compile "com.google.firebase:firebase-crash:$googlePlayServices" compile "com.google.firebase:firebase-core:$googlePlayServices" compile "com.squareup.retrofit2:retrofit:$retrofit"The following does not work. I have also tried removing "@aar" but still nothing. Main Projects:
compile ('com.sample.librarya:librarya:0.0.1@aar'){ transitive = true }and hence I have to add retrofit dependencies to the main app again.
I have done a lot of research and read a lot of SO questions but none of them help hence this question. I also have all dependencies on LibraryA listed in its pom.xml file.
最满意答案
添加以下两个依赖项:
compile ('com.sample.librarya:librarya:0.0.1@pom') compile ('com.sample.librarya:librarya:0.0.1@aar')第一个将下载pom并在classpath上添加它的所有传递依赖项。 第二个将下载aar。
Add both following dependencies:
compile ('com.sample.librarya:librarya:0.0.1@pom') compile ('com.sample.librarya:librarya:0.0.1@aar')The first will download the pom and add all it's transitive dependencies on classpath. The second will download the aar.
更多推荐
发布评论