我正在尝试将Android Studio 4.1.2更新到2020.3.1,更新失败并建议阅读idea_updater.log
。以下是更新过程中提示的对话框:
我能找到的唯一相关错误是这个:
03/08 13:57:57 INFO DeleteAction.doApply - Delete action. File: C:\Program Files\Android\Android Studio\jre\jre\bin
03/08 13:57:57 INFO DeleteAction.doApply - Delete: C:\Program Files\Android\Android Studio\jre\jre\bin
03/08 13:57:57 ERROR Patch.apply - apply failed
java.io.IOException: Cannot delete: C:\Program Files\Android\Android Studio\jre\jre\bin
at com.intellij.updater.Utils.tryDelete(Utils.java:115)
at com.intellij.updater.Utils.access$000(Utils.java:12)
at com.intellij.updater.Utils$1.postVisitDirectory(Utils.java:77)
at com.intellij.updater.Utils$1.postVisitDirectory(Utils.java:68)
at java.nio.file.Files.walkFileTree(Files.java:2688)
at java.nio.file.Files.walkFileTree(Files.java:2742)
at com.intellij.updater.Utils.delete(Utils.java:68)
at com.intellij.updater.DeleteAction.doApply(DeleteAction.java:71)
at com.intellij.updater.PatchAction.apply(PatchAction.java:213)
at com.intellij.updater.Patch.lambda$apply$3(Patch.java:406)
at com.intellij.updater.Patch.forEach(Patch.java:454)
at com.intellij.updater.Patch.apply(Patch.java:399)
at com.intellij.updater.PatchFileCreator.apply(PatchFileCreator.java:116)
at com.intellij.updater.Runner.install(Runner.java:381)
at com.intellij.updater.Runner._main(Runner.java:180)
at com.intellij.updater.Runner.main(Runner.java:41)
Caused by: java.nio.file.FileSystemException: C:\Program Files\Android\Android Studio\jre\jre\bin: Impossibile accedere al file. Il file è utilizzato da un altro processo.
at sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:86)
at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:97)
at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:102)
at sun.nio.fs.WindowsFileSystemProvider.implDelete(WindowsFileSystemProvider.java:273)
at sun.nio.fs.AbstractFileSystemProvider.delete(AbstractFileSystemProvider.java:103)
at java.nio.file.Files.delete(Files.java:1126)
at com.intellij.updater.Utils.tryDelete(Utils.java:89)
... 15 more
似乎无法删除C:\Program Files\Android\Android Studio\jre\jre\bin
文件夹,因为它已被另一个进程锁定。
目前出现错误对话框,上面引用的文件夹是空的(更新之前包含 55 个文件和 3 个文件夹)。
但是 AFAIK在更新运行时没有其他进程尝试使用Android Studio中的任何资源。试了几次,结果一样。有什么提示吗?我应该删除Android Studio并尝试全新安装吗?