[英]Compile GitHub Project to be used in Android Studio
How can I take a github project, that I have forked and edited, and the compile it so that is can be used like this 我如何进行github项目,我已经分叉和编辑,并编译它,这样可以像这样使用
dependencies {
compile 'com.github.name:project:1.0'
How can I turn a fork into something that can be used like this? 如何将fork变成可以像这样使用的东西?
Thanks 谢谢
To install some lib locally, you need to declare the project in gradle: 要在本地安装一些lib,您需要以gradle声明项目:
In settings.gradle
file, change the configuration to: 在
settings.gradle
文件中,将配置更改为:
include ':app', ':your-lib'
project(':your-lib').projectDir = new File('Path/To/The/Lib/library')
After this include in your build.gradle the dependency: 在build.gradle中包含依赖项:
dependencies {
compile project(":your-lib")
}
This will import in you IDE the module of the library, and compiles to your APK. 这将在IDE中导入库的模块,并编译到您的APK。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.