Hello, I uploaded the library
compile 'com.daimajia.slider: library: 1.1.5@aar'
and there is a bug in it, I need to fix it. But I can not make changes to the project, it is closed for editing.
Please, help!
Hello, I uploaded the library
compile 'com.daimajia.slider: library: 1.1.5@aar'
and there is a bug in it, I need to fix it. But I can not make changes to the project, it is closed for editing.
Please, help!
It is simply impossible to make changes to the library connected via jar. In order to fix the bug, clone the repository with the project to your machine, connect as a local module and then make changes to it.
If you use the git version control system in your project, then it is easiest to connect the library as a submodule . For this:
git submodule add git://github.com/path_to_lib command git submodule add git://github.com/path_to_lib ;settings.gradle file add it like this include ':libName' ;compile project(':LibName:library') build.gradle the application module.After that you can make changes to the library, which will then be displayed in your project. After that, you can easily send a pull request to the author of the library with a fixed bug.
How to work with submodules in git and how they behave when committing is read on the official website (link above).
*.jar library file (optional)You cannot change already-assembled libraries (strictly speaking you can, but this is a bad and difficult way). You can either inherit from the problem class, correct the behavior in the heir and use it if the jamb is not too deep. Or, if this open source library forks it, fix it and either send the pull request with the correction to the author of the original library so that he includes it in his repository and updates the library, or build his own implementation and use it in his project.
When you connect the library in the way that you have in question, you get a compiled file that cannot be edited.
To solve your problem, you need to connect this library in the form of source codes (point 3 of the answer), if the developer provides such a distribution format of his library (source code) and make corrections in his local copy, or, more preferable and more correctly, write him a bug report to He fixed a bug in the new version of his library and use it.
Source: https://ru.stackoverflow.com/questions/524015/
All Articles