如何在Github上创建一个库,并使用它通过在Android中的gradle工作室依赖 [英] How to create a library on Github and use it through gradle dependencies in Android Studio

查看:251
本文介绍了如何在Github上创建一个库,并使用它通过在Android中的gradle工作室依赖的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要创建库并通过互联网访问它。
在Android Studio中(通过摇篮)的依赖性可能会以这种方式补充:

I want to create the library and have access to it through the Internet. In Android Studio (via Gradle) dependency may be added in this way:

的build.gradle (模块的应用程序):

In build.gradle (Module app):

dependencies {
    ...
    compile 'com.android.support:design:23.1.0'
    compile 'com.squareup:otto:1.3.8'
    compile 'com.squareup.picasso:picasso:2.5.2'
    compile 'com.j256.ormlite:ormlite-core:4.48'
    compile 'com.j256.ormlite:ormlite-android:4.48'
    ...
}

如何添加自己的库以这种方式从GitHub?

How can I add my own library in this way from github?

推荐答案

Jitpack 是最好的导入您的项目或从 Github上来gradle这个

Refer Jitpack is best to import your project or libs from Github to gradle

有关详细信息,请参阅加布里埃莱马里奥蒂答案

For more information refer Gabriele Mariotti answer

这篇关于如何在Github上创建一个库,并使用它通过在Android中的gradle工作室依赖的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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