【发布时间】:2015-10-01 20:54:00
【问题描述】:
假设我在 github.com/myprojects/myrepo 有一个 github 存储库
我们还假设我在 IntelliJ 中有一个项目,其中包含以下内容:
dependencies {
// android
compile 'com.android.support:appcompat-v7:21.0.0'
// google play services
compile 'com.google.android.gms:play-services:6.1.71'
}
我想通过 Gradle 添加我的 github 项目,所以我想依赖项需要添加如下内容:
compile 'github.com:myprojects:myrepo'
这显然不是它的工作方式,因为我得到“无法解析 com.github:myprojects:myrepo
有效的实际例子:
compile 'com.github.satyan:sugar:1.3'
compile 'com.github.castorflex.smoothprogressbar:library:x.x.x'
由于我不想将存储库克隆到 libs 文件夹中,如何在 build.gradle 文件的依赖项部分中添加编译命令以从 github 编译,以便我可以简单地添加如下内容:
compile 'com.github.myprojects:myrepo'
【问题讨论】:
标签: android git github intellij-idea