安卓java文件锁住,无法编辑外部库文件 - 在Android Studio中显示为锁定

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:

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!

解决方案

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..!!

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值