I\'m trying to rebuild my Android Studio Gradle project (containing mostly Kotlin code), but it started to throw an UnableToDeleteFileException during the clean
UnableToDeleteFileException
The solution is quite easy.
This is one of the solution which worked for me.
It might be possible that your project's app/build/outputs/apk folder is opened.
so just close this folder and rebuild your project. and it will be solved.