Android Studio can’t delete files when compiling Code Answer

Hello Developer, Hope you guys are doing great. Today at Tutorial Guruji Official website, we are sharing the answer of Android Studio can’t delete files when compiling without wasting too much if your time.

The question is published on by Tutorial Guruji team.

When I compile my app in order to run it on the emulator, Android Studio (version 3.0 RC2) complains because it can’t delete the 1.jar file inside my project folder.

Here is the error message:

Error:Execution failed for task ':app:transformClassesWithDesugarForDebug'.
Could not delete path 'D:ProgrammazioneOfflineProjectFolderappbuildintermediatestransform

I found that cleaning the project makes it compile again but after a while it complains again. My project is not that small and rebuilding all every time takes a lot of time (around 4 mins when rebuilding all compared to 30 second when it works fine).

I had formatted my PC and changed the project’s path before the problem appeared. Did I forget to chenge some references to the project somewhere?

I did not find this issue in the knows issues.

Thanks in advance and sorry for my bad English.

EDIT: I found out that the file is being used by java.exe and killing it via cmd makes the compilation run but shouldn’t it be done by Android Studio?

EDIT2: It was the firebase plugin, the issue has been fixed, see my accepted answer


It seems that now the issue has been fixed. Update your firebase-perf plugin to version 1.1.4+ (‘’) and your firebase dependencies to version 11.6.0+.

Thanks to anyone who answered the question.


We are here to answer your question about Android Studio can’t delete files when compiling - If you find the proper solution, please don't forgot to share this with your team members.

Related Posts

Tutorial Guruji