简体   繁体   English

如何添加我的图书馆项目作为gradle依赖项?

[英]how can I add my library project as a gradle dependency?

I have a reusable library which I use for all the projects that I work on. 我有一个可重用的库,可用于我从事的所有项目。 At the moment, to link the library to the project, I create a symlync, include it in settings.graddle....etc. 目前,为了将库链接到项目,我创建了一个symlync,将其包含在settings.graddle ....等中。 Is there a way to simplify this? 有没有一种方法可以简化此过程? The ideal situation would be for me to add it just in the mobile.graddle file 对于我来说,理想的情况是将其添加到mobile.graddle文件中

ie

dependencies {
compile 'com.android.support:appcompat-v7:20.0.0

Any pointers and how to achieve this is highly appreciated. 任何指针以及如何实现这一点都受到高度赞赏。

Note: I'm not willing to share the lib with the world. 注意:我不愿意与世界分享lib。

也许此链接可以为您提供帮助: https : //jitpack.io/private#auth

  1. Android Studio- File -> New -> Import Module (Locate the module and choose it and click Finish.) Android Studio-文件->新建->导入模块(找到该模块并选择它,然后单击完成。)

  2. Once the module has been imported, File -> Project Structure -> Dependencies -> click + -> Choose Module dependency. 导入模块后,请依次选择文件->项目结构->依赖关系->单击+->选择模块依赖关系。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM