如何编辑gradle库的源代码并使用项目中的更改? [英] How can I edit the source of a gradle library and use the changes in my project?
本文介绍了如何编辑gradle库的源代码并使用项目中的更改?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
让我们以 Yalantis Phoenix Library 为例.我不想通过gradle导入项目,但是我想编辑和使用库的源代码,因为作者没有提供以编程方式编辑某些文件的方法.
Let's use Yalantis Phoenix Library as an example. I don't want to import the project via gradle, but I want to edit and use the source code of the library since the author provides no way to edit some of the files programatically.
我完成的方式如下:
-
解压缩文件夹
Unzip folder
文件>新建>导入模块(选择Phoenix-master文件夹)
File > New > Import Module (select Phoenix-master folder)
现在,我的gradle文件包含:
Now, my gradle file has:
dependencies {
//...
compile project(':library')
}
但是该库无法编译.我错过了哪一步?
But the library doesn't compile. What step am I missing?
我收到以下错误:
Error:Could not find method isReleaseBuild() for arguments [] on project ':library' of type org.gradle.api.Project.
推荐答案
更改这些行:
dependencies {
//...
compile project(':library')
}
进入
dependencies {
//...
compile 'com.yalantis:phoenix:1.2.3'
}
这篇关于如何编辑gradle库的源代码并使用项目中的更改?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文