Reputation: 89
I have ran into an odd issue. I am using an external pdf viewer library for my app and the library gives full read & write access (to modify files). During testing i realised a small glitch (which can be fixed by editing one of the library .java files) however when I go to edit the file it won't let me, in Android Studio it is showing the library as locked. I have tried removing the lock from the bottom right hand corner but this won't work either.
Here is the library being added to the dependencies:
compile 'com.joanzapata.pdfview:android-pdfview:1.0.4@aar'
I am also attaching a screen shot of my Android Studio project pane as I believe this will help troubleshoot:
Android Studio Project Pane Screen Shot
The files all seem to be under 'class.jar' and the file I wish to edit is the 'Constants.java' file and I am using Android Studio v1.5 (Stable).
Strangely enough, I got a friend to compile this library in his Android Studio and he was able to edit it, which I found weird. Somehow I have locked myself out and have only Read permissions; I am thinking this could be to do with committing my project to GitHub but I am not sure.
I have searched around and tried all possible solutions but no success till now.
Any help would be appreciated. Thanks in Advance!
Upvotes: 3
Views: 10773
Reputation: 1061
You can import the library as a module, Here is a link for library:- https://github.com/JoanZapata/android-pdfview
If you think your changes can help make library better, then i would recommend to contribute to the github project.
Anyways, the library will be imported to your project and it will be editable. This link will help you with importing library in a studio project:- http://www.truiton.com/2015/02/android-studio-add-library-project/
Change the source code of library at your own risk..!!
Upvotes: 4
Reputation: 1501
You cannot edit the files contained within the jar or aar. If you want to edit these files you will have to download the source library and make the edits yourself followed by compiling it into either a jar or aar file.
Upvotes: 1