Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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)
like image 528
Kyser Avatar asked Sep 25 '14 01:09

Kyser


2 Answers

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.

like image 56
noob - HREF Avatar answered Oct 24 '22 10:10

noob - HREF


A workaround:

1-Close Android Studio.
2-Right-click "Android Studio" icon and select "Run as administrator".
3-Go to "Help->Check for Update..."
like image 40
Ahmad Aghazadeh Avatar answered Oct 24 '22 11:10

Ahmad Aghazadeh