如何在Eclipse中使用Maven导入Android的AAR的依赖? [英] How to import Android AAR dependencies using Maven in Eclipse?

查看:1325
本文介绍了如何在Eclipse中使用Maven导入Android的AAR的依赖?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请注意:我使用Maven 3.2.2,Eclipse的红月

Note : I am using Maven 3.2.2, Eclipse Luna

这是在我的pom.xml中使用Android的AAR存档的依赖

This is the dependency in my pom.xml that uses Android AAR archive

<dependency>
    <groupId>com.github.gabrielemariotti.cards</groupId>
    <artifactId>library</artifactId>
    <version>1.7.3</version>
    <type>aar</type>
</dependency>

我可以看到安装在目标/ classes文件夹中的类。

I can see the classes installed in target/classes folder.

但是,当我尝试在AAR,Eclipse是展示类使用的类不能得到解决。我有利用JAR依赖关系的pom.xml添加的类没有问题

But when I try to use the classes in the AAR, Eclipse is showing class cannot be resolved. I have no problem using classes added by JAR dependencies in pom.xml

任何帮助将大大AP preciated。

Any help would be greatly appreciated.

推荐答案

目前present时刻 m2e- Android的插件不能支持AAR文件,因为ADT开发团队添加AAR支持到Eclipse ADT插件。

At this present moment in time the m2e-android plug-in cannot support AAR files because the ADT development team have not added AAR support to the Eclipse ADT plug-in.

这是一个悬而未决的问题:

This is an outstanding issue:

<一个href=\"https://github.com/rgladwell/m2e-android/issues/177\">https://github.com/rgladwell/m2e-android/issues/177

这篇关于如何在Eclipse中使用Maven导入Android的AAR的依赖?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆