Home » Android » How to edit the code of a library imported with Gradle in Android Studio?

How to edit the code of a library imported with Gradle in Android Studio?

Posted by: admin May 14, 2020 Leave a comment

Questions:

I’m facing a little problem with one of my libraries in Android Studio. This one is imported with a Gradle file, like this :

dependencies {
    compile 'com.github.navasmdc:MaterialDesign:[email protected]'
}

It has a known issue from its GitHub repository but I can only fix it by editing one line of code in a file of this library… The problem is that I can’t find its code in Android Studio.

From another Stackoverflow post, I’ve found this :

apply plugin: 'idea'
idea{
    module {
        downloadJavadoc = true
        downloadSources = true
    }
}

But after applying it and reloading my Gradle configuration, I still can’t find the code.

Can you help?

Thanks!

How to&Answers:

You can also extend that class and override that method. After overriding just update the code according to your need and solve that bug and use your new class 🙂