Android Studio I keep getting Gradle error “The process cannot access the file because it is being used by another process”

后端 未结 11 1579
伪装坚强ぢ
伪装坚强ぢ 2020-12-16 10:12

I can import a sample app project, try to build it and I keep getting this error. Not always the same file but a new temp file each time. I\'ve tried several different sampl

11条回答
  •  一个人的身影
    2020-12-16 10:28

    Invalidate Caches / Restart doesn't work all the time and it's not the better idea to close the whole Android Studio just we couldn't figure out what process was using it.

    Please follow the below steps to figure out which process is using your file.

    You can use the Resource Monitor for this which comes built-in with Windows 7, 8, and 10.

    1. Open Resource Monitor, which can be found By searching for Resource Monitor or resmon.exe in the start menu, or As a button on the Performance tab in your Task Manager
    2. Go to the CPU tab
    3. Use the search field in the Associated Handles section

    When you've found the handle, you can identify the process by looking at the Image and/or PID column.

    You can then try to close the application as you normally would, or, if that's not possible, just right-click the handle and kill the process directly from there.

    Ref : https://superuser.com/questions/117902/find-out-which-process-is-locking-a-file-or-folder-in-windows

提交回复
热议问题