I\'m trying to rebuild my Android Studio Gradle project (containing mostly Kotlin code), but it started to throw an UnableToDeleteFileException
during the clean
I had the same problem and I solved it by moving project folder into ext4 partition
If you are using Android Studio 2.0 Beta, this issue might appear (more likely if you are working on NTFS filesystem) and it seems like the "Instant Run" is the culprit. Search for "Instant Run" in settings and uncheck the box.
I have filed an issue on the bug tracker.
react native devs
run
sudo cd android && ./gradlew clean
and if you want release apk
sudo cd android && ./gradlew assembleRelease
Hope it will help someone
For me, this happened because of an active debugging process. So, before cleaning or rebuilding, make sure to kill all active processes. To nail down the success, execute Invalidate Caches/Restart.
For me it helps when I Exit Android Studio
, click one more time Clean Project
(it appears the same error) and next click Make Project
- after that of course Run 'app'
button in Android Studio.
This issue appeared to me in android studio 2.0 stable channel and the solution was due to a problem happened while updating my android studio i solved this by installing a fresh android studio. after deleting all old files for the old installation. and to keep the very nice feature of Instant Run