如何将特定的库github提交库集成到Android项目中?

Ant*_*ony 0 android github gradle

如何使用github上的android库的特定版本(拉取请求,或只是特定的提交)?

Ant*_*ony 6

您可以访问https://jitpack.io,然后键入库的地址.然后,您可以浏览版本或提交版本.

如果是PR的情况,你必须把fork的地址和选择好的提交版本.

单击获取它,并将生成的文本添加到项目中:

在你的项目上 build.gradle

allprojects {
    repositories {
        ...
        maven { url "https://jitpack.io" }
    }
}
Run Code Online (Sandbox Code Playgroud)

和你的模块gradle文件

dependencies {
        compile 'com.github.userName:libraryName:firstTenCommitTagChars'
}
Run Code Online (Sandbox Code Playgroud)