Android Studio最佳方式从其他存储库导入模块

Jos*_*hon 9 git android repository gradle

我必须将一个项目从Github存储库导入为Android Studio项目中的一个模块,并将其提交到另一个存储库中.

我必须从Github导入的项目将不断更新,这意味着我必须不时刷新,以便对模块进行最新的更改.

由于新模块作为基础项目将具有独立开发,这是导入模块的最佳方式?我应该检查Android Studio文件夹中的Github存储库吗?

谢谢

Moh*_*san 10

我建议使用Jitpack

Jitpack:GitHub易于使用的软件包存储库,只需将它包含在您的gradle中,现在您可以将github项目作为模块处理

谢谢Jitpack <3


例如:我们有这个存储库:https://github.com/florent37/MaterialViewPager

并在你的gradle中使用Jitpack:

repositories {
    maven {
        url "https://jitpack.io"
    }
}
Run Code Online (Sandbox Code Playgroud)
dependencies {
        compile 'com.github.florent37:MaterialViewPager:1.0.5'
}
Run Code Online (Sandbox Code Playgroud)

您可以将它与私有存储库一起使用,但它需要注册/登录