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

Android Studio

Android Studio Problem Overview


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?

Android Studio Solutions


Solution 1 - Android Studio

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.

Solution 2 - Android Studio

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.

Solution 3 - Android Studio

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.

Solution 4 - Android Studio

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.

Solution 5 - Android Studio

if u install for all users than , run as admin will solve it . Tested in windows 8 also.

Solution 6 - Android Studio

SIMPLEST SOLUTION: Uninstall Android Studio and install it again I had the same problem and it solved .

Solution 7 - Android Studio

Simply go and delete the cache folder from user .AndroidStudio3. . It solved problem

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionYasir AliView Question on Stackoverflow
Solution 1 - Android Studiouser2470115View Answer on Stackoverflow
Solution 2 - Android Studiouser2440906View Answer on Stackoverflow
Solution 3 - Android StudioRobView Answer on Stackoverflow
Solution 4 - Android StudioA_rnOView Answer on Stackoverflow
Solution 5 - Android StudioAbhinav VinnakotaView Answer on Stackoverflow
Solution 6 - Android StudioPrashanthView Answer on Stackoverflow
Solution 7 - Android StudioNilesh kashayapView Answer on Stackoverflow