3

I have just added a jar in android studio by pasting it in the libs folder and adding it as a library. Moreover it does show the jar added in build.gradle file and I am able to import the files however I am not able to edit those files as they have a lock icon on those files. I have tried setting permissions to that folder to full control for all users and I have even tried Android studio lock icon on files but nothing helped...Any suggestions to get this working will be really appreciated.

Community
  • 1
  • 1
G droid
  • 956
  • 5
  • 13
  • 36

2 Answers2

13

In the bottom-right corner of Android Studio window (version 1.2), there is a padlock icon. You can click it to toggle between lock/unlock of the currently open file.

I hope that helps someone.

I am not yet legible to adding images to answers on SO. But with the directions above, you should see the padlock icon.

LivePwndz
  • 600
  • 1
  • 8
  • 14
  • Is the file you mean to unlock/lock open in android studio when you reach for the lock/unlock icon? Make sure you at least have one open file. Otherwise, the icon will be disabled. – LivePwndz May 06 '15 at 10:02
  • my drawable folder is locked :( – Muhammad Babar May 06 '15 at 10:19
  • I am encountering the same problem, i have added a library – Moeez Oct 27 '17 at 10:55
  • @faisal1208 In most editors, jar ( library ) files are readonly. However see if this link can help you achieve what you want: https://stackoverflow.com/questions/40698957/my-jar-resource-files-in-intellij-are-read-only-and-i-need-to-edit-them – LivePwndz Oct 27 '17 at 11:45
1

In my case, I had somehow accidentally changed permissions for my files . There was only read permission in the files . So i checked the permissions by ls -l . Then changed the permissions to read,write,execute by chmod 775 by logging into root. Then restarted Android Studio and it WORKED !!!