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

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

问题描述

我想创建库并可以通过 Internet 访问它.在 Android Studio(通过 Gradle)中可以通过这种方式添加依赖项:

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(模块应用)中:

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?

推荐答案

Refer Jitpack 最好导入你的项目或者从 Github 到 gradle

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

有关详细信息,请参阅 Gabriele Mariotti 答案

For more information refer Gabriele Mariotti answer

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

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