简体   繁体   English

如何在我的Android项目中添加github库?

[英]How to add a github library to my android project?

I would like to add this library so that I can use it on my android project but I can't figure out how to. 我想添加这个库,以便可以在我的android项目上使用它,但是我不知道如何去做。 I get that I'm supposed to clone it but it doesn't say into which directory I should clone it. 我知道我应该克隆它,但没有说明我应该将其克隆到哪个目录中。 I'm also not sure if I should use ant or maven, what those are, and how to do that. 我也不确定我应该使用ant还是maven,它们是什么,以及如何使用。 Any help would be appreciated. 任何帮助,将不胜感激。

This is the project I'm hoping to add it to: https://github.com/mikeoles/swiftset 这是我希望将其添加到的项目: https : //github.com/mikeoles/swiftset

One more project i which is forked from bauerca/drag-sort-listview is available for drag-sort-listview and dependency of that project is deployed on maven repository 从bauerca / drag-sort-listview分叉的另一个项目i可用于drag-sort-listview,并且该项目的依赖项已部署在maven存储库中

https://github.com/ened/drag-sort-listview https://github.com/ened/drag-sort-listview

Gradle is available on mvn repository. Gradle在mvn存储库中可用。 check this URL 检查此URL

https://mvnrepository.com/artifact/asia.ivity.android/drag-sort-listview/1.0 https://mvnrepository.com/artifact/asia.ivity.android/drag-sort-listview/1.0

Add this to your android project 将此添加到您的android项目

compile group: 'asia.ivity.android', name: 'drag-sort-listview', version: '1.0' 编译组:“ asia.ivity.android”,名称:“ drag-sort-listview”,版本:“ 1.0”

this project is not a library project instead it is an Android app project so what you have to do is to clone the repo https://github.com/mikeoles/SwiftSet.git and open this as an existing Android project. 该项目不是库项目,而是Android应用程序项目,因此您需要克隆仓库repo https://github.com/mikeoles/SwiftSet.git并将其作为现有的Android项目打开。 FYI, you can check android project structure at this link https://developer.android.com/studio/projects/ . 仅供参考,您可以通过以下链接https://developer.android.com/studio/projects/检查android项目的结构。

You can make the library support gradle. 您可以使库支持更容易。 Or copy code to you project(the project has no update in last 5 years). 或将代码复制到您的项目中(该项目在过去5年中没有更新)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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