Getting update error while updating Android studio 3.4 to 3.5.1

Viewed 2879

Update Error: An error occurred when applying the patch: IOException: Cannot delete: C:\Program Files\Android\Android Studio\jre\lib\tools.jar

Getting the below logs from idea_updater.log file

    15/10 12:25:10 ERROR Patch.apply - apply failed
java.io.IOException: Cannot delete: C:\Program Files\Android\Android Studio\jre\lib\tools.jar
    at com.intellij.updater.Utils.tryDelete(Utils.java:109)
    at com.intellij.updater.Utils.access$000(Utils.java:12)
    at com.intellij.updater.Utils$1.visitFile(Utils.java:72)
    at com.intellij.updater.Utils$1.visitFile(Utils.java:69)
    at java.nio.file.Files.walkFileTree(Files.java:2670)
    at java.nio.file.Files.walkFileTree(Files.java:2742)
    at com.intellij.updater.Utils.delete(Utils.java:69)
    at com.intellij.updater.BaseUpdateAction.replaceUpdated(BaseUpdateAction.java:115)
    at com.intellij.updater.UpdateAction.doApply(UpdateAction.java:66)
    at com.intellij.updater.PatchAction.apply(PatchAction.java:199)
    at com.intellij.updater.Patch.lambda$apply$3(Patch.java:399)
    at com.intellij.updater.Patch.forEach(Patch.java:471)
    at com.intellij.updater.Patch.apply(Patch.java:390)
    at com.intellij.updater.PatchFileCreator.apply(PatchFileCreator.java:64)
    at com.intellij.updater.Runner.install(Runner.java:366)
    at com.intellij.updater.Runner.main(Runner.java:138)

enter image description here

Cannot found any solution.

2 Answers

Open your task manager and kill your Java updater

You can try -Clean Project->Rebuild(Build tab) or if this does not work try -Invalidate Cache with Restart(File tab), if this doesn't work too, try: -Close Project, go manually to that path and delete that file tools.jar

Related