Kyser
Kyser

Reputation: 71

Error when updating Android Studio

When I try update my Android Sudio I get this message:

Temp. directory: C:\Users\Rick\AppData\Local\Temp\

+----------------
| A file operation failed.
| This might be due to a file being locked by another
| application. Please try closing any application
| that uses the files being updated then press 'Retry'.
+----------------


com.intellij.updater.RetryException: Cannot delete file C:\Users\Rick\AppData\Local\Android\android-studio\plugins\gradle\lib\gradle-tooling-extension-impl.jar
    at com.intellij.updater.BaseUpdateAction.replaceUpdated(BaseUpdateAction.java:40)
    at com.intellij.updater.UpdateZipAction.doApply(UpdateZipAction.java:199)
    at com.intellij.updater.PatchAction.apply(PatchAction.java:140)
    at com.intellij.updater.Patch$3.forEach(Patch.java:198)
    at com.intellij.updater.Patch.forEach(Patch.java:248)
    at com.intellij.updater.Patch.apply(Patch.java:194)
    at com.intellij.updater.PatchFileCreator.apply(PatchFileCreator.java:86)
    at com.intellij.updater.PatchFileCreator.apply(PatchFileCreator.java:77)
    at com.intellij.updater.Runner.doInstallImpl(Runner.java:307)
    at com.intellij.updater.Runner.doInstall(Runner.java:268)
    at com.intellij.updater.Runner.access$000(Runner.java:18)
    at com.intellij.updater.Runner$2.execute(Runner.java:258)
    at com.intellij.updater.SwingUpdaterUI$7.run(SwingUpdaterUI.java:230)
    at java.lang.Thread.run(Thread.java:745)

Upvotes: 7

Views: 3346

Answers (4)

Al Kasih
Al Kasih

Reputation: 886

There is no way for updating anything without the rule of updater. And the rule must be administrator or super user.

P.S.

As how it's name, updating is updating, renewing or deleting. Then it knows what it takes.

Upvotes: 0

Ahmad Aghazadeh
Ahmad Aghazadeh

Reputation: 17131

A workaround:

1-Close Android Studio.
2-Right-click "Android Studio" icon and select "Run as administrator".
3-Go to "Help->Check for Update..."

Upvotes: 2

noob - HREF
noob - HREF

Reputation: 145

The file Android\android-studio\plugins\gradle\lib\gradle-tooling-extension-impl.jar is probably in use by some JVM process (shown as java.exe in Task Manager).

Solution that worked for me was to close the updater and close all java.exe processes in Task Manager, then open Android Studio and try updating once more. This time the update should go all the way through.

Upvotes: 9

NightStalker
NightStalker

Reputation: 133

I was getting the exact error you getting. I left my PC on over night and clicked retry and it worked. Very strange. I also tried using:

handle - http://technet.microsoft.com/en-us/sysinternals/bb896655.aspx and Process explorer - http://technet.microsoft.com/en-us/sysinternals/bb896653

to check what is locking that file and they both showed nothing. That is when I clicked retry and it worked

Upvotes: -1

Related Questions