如何编译叉图书馆摇篮? [英] How to compile forked library in Gradle?
问题描述
我要comile以下图书馆在我的项目的build.gradle
:
I want to comile following library in my project in build.gradle
:
<一个href=\"https://github.com/theDazzler/Android-Bootstrap\">https://github.com/theDazzler/Android-Bootstrap
这是从<分叉href=\"https://github.com/Bearded-Hen/Android-Bootstrap\">https://github.com/Bearded-Hen/Android-Bootstrap,但是,没有给出文档如何在包括项目。
It is forked from https://github.com/Bearded-Hen/Android-Bootstrap, But no documentation given how to include in in project.
我想是这样的:
compile 'com.theDazzler:androidbootstrap:+'
但失败的gradle并显示错误库未找到。
but gradle failed and shows error that library not found.
编辑:任何人都可以派生它和/或发布
Can anyone fork it and/or publish it?
推荐答案
这叉未在Maven的中央回购发表
然后你的不能使用如进口编译com.theDazzler:androidbootstrap:+
您必须:
- 本地克隆此库作为项目中的模块
克隆
<一href=\"https://github.com/theDazzler/Android-Bootstrap/tree/master/AndroidBootstrap\">https://github.com/theDazzler/Android-Bootstrap/tree/master/AndroidBootstrap文件夹根/模块1文件夹中。
You have to: - clone this library locally as a module in your project Clone the https://github.com/theDazzler/Android-Bootstrap/tree/master/AndroidBootstrap folder in your root/module1 folder.
root:
module1
build.gradle
app
build.gradle
settings.gradle
-
更改您的settings.gradle文件
Change your settings.gradle file in
包括':模块1
包括:应用程序include ':module1' include ':app'
在你的应用程序/文件的build.gradle你必须添加:
In your app/build.gradle file you have to add:
dependencies { // Module Library compile project(':module1') }
最后,在你的模块1 /的build.gradle你必须检查用于插件的gradle水平。
Finally in your module1/build.gradle you have to check the level used for gradle plugin.
编辑31/10/2015:
您可以用另一种方式来添加一个github上的项目的依赖,使用GitHub的回购和 jitpack 插件结果
在这种情况下,你必须添加此回购TP你的的build.gradle
You can use another way to add a dependency with a github project,using the github repo and the jitpack plugin
In this case you have to add this repo tp yourbuild.gradle
repositories { // ... maven { url "https://jitpack.io" } }
和依赖:
dependencies { compile 'com.github.User:Repo:Tag' }
这篇关于如何编译叉图书馆摇篮?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!