Android Studio 把module上传到github作为库引用

1,先打通GitHub与本机的连接,怎么打通,请看我的这篇帖子(点击下方Link)

     GitHub使用教程

2,打开GitHub的项目界面 GitHub 找到You project  切换到Repositories  点击release 创建一个新的release




输入完成后,直接提交 就ok了,到这里库已经完成了,后面就是如何引用了。



引入方式

进入https://www.jitpack.io/输入对应的信息查看可引入的版本,如下图:输入你的GitHub地址,然后LookUP,在这里就会找到你的工程的release版本,点击GetIt,当状态为绿色的时候表示成功,1.0.1红色的表示失败的。





Android studio如何使用

打开你的工程总Gradle在如下的位置 添加 maven { url'https://www.jitpack.io' }

allprojects {

repositories {

google()

jcenter()

maven { url'https://www.jitpack.io' }

}

}



切换为project模式

在APP的gradle中    implementation'com.github.wechat-AmosCC:AlbumEffect:1.0.2' 然后同步一下即可!

dependencies {

implementation fileTree(dir:'libs',include: ['*.jar'])

    implementation'com.android.support:appcompat-v7:28.0.0-alpha1'

    implementation'com.android.support.constraint:constraint-layout:1.1.0'

    implementation'com.github.wechat-AmosCC:AlbumEffect:1.0.2'

}

你可能感兴趣的:(Android Studio 把module上传到github作为库引用)