Error: Execution failed for task ':app:clean'. Unable to delete file

后端 未结 30 1230
感动是毒
感动是毒 2020-11-29 17:19

I\'m trying to rebuild my Android Studio Gradle project (containing mostly Kotlin code), but it started to throw an UnableToDeleteFileException during the clean

30条回答
  •  伪装坚强ぢ
    2020-11-29 18:05

    I was facing same issue on Android Studio 2.2 preview 1, solution by @AndresSuarez was correct but for some reasons I couldn't find JAVA TM process in my task manager. So I tried the following solution and it worked -

    Open command prompt and type TASKKILL /F /IM java.exe. This will kill all JAVA TM processes automatically. Now re-compile the app again, it will work.

    Additionally, you can create a .bat file, add the above code in it and run it every time you face the issue.

提交回复
热议问题