如何将自己的github分支库导入android studio [英] how to import your own github forked library into android studio
问题描述
我在GitHub上找到了一个不错的开放库,我使用Gradle依赖项将其导入到Android Studio项目中,但是后来我意识到我需要对其进行一些修改.
I found a nice open library on GitHub, I imported it into my Android Studio project using Gradle dependencies, but then I realized I need to make little modifications on it.
所以我在GitHub上分叉了库,进行了修改,并请求了拉取请求,但是我等不及了,直到他们批准并将我的修改与原始代码合并.
So I forked the library on my GitHub, done the modifications and asked for a pull request, but I can't wait until they approve and merge my modifications with the original code.
是否可以使用依赖项将派生的库(在我的Github中)导入到Android Studio项目中,而不是原始库中?
Is there a way to use dependencies to import my forked library (in my Github) into my Android Studio project, rather than the original library?
推荐答案
我知道这是一篇过时的文章,但是对于有类似问题的人,如果您只是想更改库并在项目中使用它,您可以下载lib代码,对其进行更改并将其作为模块导入到您的项目中:
I know that this is an old post, but for someone with similar problem, if you simply want a way to change a lib and use it in your project, you can download the lib code, change it and import into your project as a module:
- 在Android Studio中打开您的项目
- 下载库(使用Git或zip压缩文件解压缩)
- 转到文件">新建">导入模块",然后将库作为模块导入
- 在项目视图中右键单击您的应用,然后选择打开模块设置"
- 点击依赖项"标签,然后点击"+"按钮
- 选择模块依赖性"
- 选择导入的模块
- 打开您的build.gradle文件,并检查模块是否在依赖项下列出.
这篇关于如何将自己的github分支库导入android studio的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!