简体   繁体   中英

Download a Android library from Github to IntelliJ Idea

是否可以从Github将Android库直接下载到IntelliJ Idea 12中的Android项目中?

You can download an Android Library directly into your build by using JitPack . Basically you tell it which repository you want and it will build it for you. Once its built you can use the library as a dependency.

If you are using gradle then you'd add this to build.gradle:

repositories {
    maven { url "https://jitpack.io" }
}

dependencies {
    compile 'com.github.Owner:Repository:Version'
}

You can also enter the github repo url on the jitpack.io website and it will give you the dependency to paste in your build file.

它应适用于库项目的源代码,在项目目录下执行检出,然后在启用了Android facet且“ 是否启用了库项目”选项的情况下为此目录配置一个新模块,然后将此模块作为依赖项添加到主应用程序。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM