How can I edit the source of a gradle library and use the changes in my project?

♀尐吖头ヾ 提交于 2019-12-11 07:29:58

问题


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.

The way I've done, it is the following:

  1. Unzip folder

  2. File > New > Import Module (select Phoenix-master folder)

  3. Now, my gradle file has:

    dependencies {  
        //...  
        compile project(':library')  
    }
    

But the library doesn't compile. What step am I missing?

I get the following error:

Error:Could not find method isReleaseBuild() for arguments [] on project ':library' of type org.gradle.api.Project.

回答1:


Change these lines:

dependencies {
//...
    compile project(':library')
}

into

dependencies {
//...
 compile 'com.yalantis:phoenix:1.2.3'
}



回答2:


Please read the usage guidelines already given in the link here Usage . Include the library as local library project.

compile 'com.yalantis:phoenix:1.2.3'


来源:https://stackoverflow.com/questions/41315999/how-can-i-edit-the-source-of-a-gradle-library-and-use-the-changes-in-my-project

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!