如何编辑Gradle依赖项 [英] How to edit a gradle dependency

查看:142
本文介绍了如何编辑Gradle依赖项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个在我的gradle文件中使用以下依赖项的android项目;

I'm working on an android project that uses the following dependency in my gradle file;

compile 'com.mapzen:on-the-road:1.1.1'

我想编辑其中一个文件,以添加一些缺少的功能并为该项目做出贡献.

I would like to edit one of the files in order to add some missing features and contribute to the project.

如何在Android Studio项目中下载此项目并测试编辑?

How can I download this project and test edits in my android studio project?

推荐答案

我刚刚发现该项目是开源的,可以在Github中找到.

I just found out that the project is open-source and is available in Github.

请遵循以下简单步骤-

1)转到页面,然后单击克隆或下载",然后点击下载ZIP".

1) Go to this page and click on "Clone or Download" and then click on "Download ZIP".

2)这将为您提供ZIP文件,您需要将其解压缩以获取整个项目.

2) This will give you the ZIP file which you need to extract to get the entire project.

3)现在,您可以自由编辑项目中想要的任何文件.

3) Now you are free to edit any files in the project you want to.

4)要将这个自定义项目包含到您的父项目中,您需要将该项目粘贴到您的邮件项目中,并像这样将其包含在 settings.gradle 文件中,

4) To include this custom project into your parent project, you need to paste this project into your mail project, include it in the settings.gradle file like this,

include ':app', ':customLibrary'

,然后您需要从应用程序的 build.gradle 文件中编译库,

and then you need to compile the library from your app's build.gradle file,

compile project(':customLibrary')

注意-确保将其从build.gradle文件中删除,

NOTE - Make sure you remove this from the build.gradle file,

compile 'com.mapzen:on-the-road:1.1.1'

这篇关于如何编辑Gradle依赖项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆