【问题标题】:Missing artifact com.XXX:jar:XXX when adding AAR library in pom.xml在 pom.xml 中添加 AAR 库时缺少工件 com.XXX:jar:XXX
【发布时间】:2014-07-11 09:45:13
【问题描述】:

添加库时,即来自 maven Central 的 com.XXX:jar:XXX,它显示 Missing artifact com.XXX:jar:XXX。

查看maven central 中的库,该特定库的下载部分没有.jar。

如何在 pom.xml 中添加 AAR 库?

【问题讨论】:

    标签: android maven pom.xml


    【解决方案1】:

    答案引用自:https://code.google.com/p/maven-android-plugin/wiki/AAR

    在 Maven pom.xml 中添加 AAR 库。

    <dependency> 标签内添加<type>aar</type>

    例如:

      <dependency>
        <groupId>com.google.android.gms</groupId>
        <artifactId>play-services</artifactId>
        <version>4.4.52</version>
        <type>aar</type>
      </dependency>
    

    注意:

    如果需要采取任何其他信息/注意事项等,请添加到此答案中。谢谢。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-08-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-07-12
      • 2015-08-31
      • 2017-08-08
      相关资源
      最近更新 更多