Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio failed to open by giving error "Files Locked"

After running once successfully, Android Studio is getting failed to open. The error is:

Files in C:\Program Files (x86)\Android\android-studio\system\caches are locked. Android Studio will not be able to start.

Did any one find its solution?

like image 616
Yasir Ali Avatar asked May 31 '13 11:05

Yasir Ali


4 Answers

Solved in Windows 7:

  1. Go to folder where android-studio is installed. (e.g. C:\Program Files (x86)\Android\android-studio)

  2. Now go up one folder. (i.e. C:\Program Files (x86)\Android)

  3. Right click on the android-studio folder and go to Properties.

  4. In the Properties window, go to the Security tab.

  5. Click the Edit button.

  6. A new window will open, here you click the Users (your-username-or-your-group-name)

  7. From the list below, check Allow in front of Full control.

  8. Press OK, then again OK.

Now you can use Android Studio easily instead of "Running it As Administrator" every time.

like image 179
user2470115 Avatar answered Oct 31 '22 12:10

user2470115


If you are running in Windows 7 / Vista/ etc. then try running Android Studio as administrator. I was having the same problem and this fixed it for me.

like image 25
user2440906 Avatar answered Oct 31 '22 11:10

user2440906


I installed it for all users too, and got this same error on second run. Didn't want to reinstall it, and also prefer not to run programs as admin unless necessary, so I just changed a couple file permissions and it runs fine.

I changed the settings on C:\Program Files (x86)\Android\android-studio and let it apply to all sub-folders -- removed Read-Only, and gave localhost/Users group permissions to modify files in this folder. Worked fine afterwards. If you want to be more secure, just give your user permissions to modify those folders.

like image 4
Rob Avatar answered Oct 31 '22 13:10

Rob


During the installation, select "install for the current user". Android Studio will be installed in the user's folders, without any authorization issues. Personally I do not like to run program with Administrator power.

like image 2
A_rnO Avatar answered Oct 31 '22 12:10

A_rnO