如何在包括Android的图书​​馆摇篮项目的依赖? [英] How to include dependencies in android library gradle project?

查看:210
本文介绍了如何在包括Android的图书​​馆摇篮项目的依赖?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要建采用Android Studio的一个Android库项目摇篮。它有一些地方依赖关系:

I'm building an android library project with Gradle using Android Studio. It has some local dependencies:

编制项目(:androidlibrary')

与嵌套,额外的外部依赖:

with nested, additional external dependencies:

编译组:com.google.guava,名称:番石榴,版本:'14 .0.1

我设法建立 AAR 文件,但没有外部或本地依赖性都包括在内。我希望外部依赖性要提到的POM文件发布时使用Maven,但对于本地的?

I managed to build the aar file but no external or local dependencies are included. I expect external dependencies to be mentioned in the POM file when published to maven, but what about the local ones?

什么是正确的方式来建立这样的项目?

What is the right way to build such project?

推荐答案

我结束了从Maven的下载库中的 Intellj IDEA 作为描述的此处。它下载库和所有它的依赖到本地目录。

I ended up using "download library from maven" feature of Intellj IDEA as described here. It downloads the library and all it's dependencies to the local directory.

只是一个善意的警告:包括相关性被认为是在应该避免一个非常不好的做法。这可能会导致冲突。

Just a friendly warning: including dependencies is considered a very bad practice at SHOULD BE AVOIDED. It may cause conflicts.

这篇关于如何在包括Android的图书​​馆摇篮项目的依赖?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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