从其他存储库的Andr​​oid工作室的最佳方法导入模块 [英] Android Studio Best way import module from other repository

查看:231
本文介绍了从其他存储库的Andr​​oid工作室的最佳方法导入模块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不得不从Github上库作为一个Android Studio项目,它提交到另一个仓库内的一个模块导入项目。

I have to import a project from a Github repository as a module inside an Android Studio project that it committed into another repository.

这个项目我必须从Github上导入这样就意味着我必须现在又刷新为每一个具有模块上完成的最新的变化将不断更新。

The project I have to import from Github will be updated constantly so it means that I'll have to refresh every now and again for having the latest changes done on the module.

由于新模块作为基地项目将具备独立发展,这是导入模块的最好方式?我应该看看Android的工作室文件夹内的Github上库?

Since the new module as the base project will have independent development, which is the best way to import the module? should I check out the Github repository inside the Android Studio folder?

感谢

推荐答案

我会建议使用 Jitpack

Jitpack:易于使用的GitHub的包库,只需将它包括在里面的gradle,现在你可以处理github上项目作为一个模块

Jitpack: Easy to use package repository for GitHub, just include it inside your gradle, and now you can deal with github project as a module

感谢Jitpack 3;

Thanks Jitpack <3

例如:
我们有这个资源库:<一href=\"https://github.com/florent37/MaterialViewPager\">https://github.com/florent37/MaterialViewPager

和与Jitpack在gradle这个:

and with Jitpack in your gradle:

repositories {
    maven {
        url "https://jitpack.io"
    }
}


dependencies {
        compile 'com.github.florent37:MaterialViewPager:1.0.5'
}


你还可以用私有仓库使用它,但它需要注册/登录


And you can use it with private repositories, but it require signup/login

这篇关于从其他存储库的Andr​​oid工作室的最佳方法导入模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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