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

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

问题描述

注意:我正在使用Maven 3.2.2,Eclipse Luna



这是使用Android AAR存档的pom.xml中的依赖关系

 <依赖关系> 
< groupId> com.github.gabrielemariotti.cards< / groupId>
< artifactId>库< / artifactId>
< version> 1.7.3< / version>
< type> aar< / type>
< / dependency>

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



但是当我尝试使用AAR中的类时,Eclipse显示的类无法解析。我在pom.xml中使用JAR依赖关系添加的类没有问题



任何帮助将不胜感激。

解决方案

在目前的时刻, m2e-android插件无法支持AAR文件,因为ADT开发团队尚未添加AAR支持Eclipse ADT插件



这是一个未解决的问题:



< a href =https://github.com/rgladwell/m2e-android/issues/177 =noreferrer> https://github.com/rgladwell/m2e-android/issues/177


Note : I am using Maven 3.2.2, Eclipse Luna

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>

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

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

Any help would be greatly appreciated.

解决方案

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:

https://github.com/rgladwell/m2e-android/issues/177

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

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