15

As I rebuild a Gradle project in Android studio, it gives me the following error:

Gradle: Execution failed for task ':lib:clean'. Unable to delete directory: /path/to/project/lib/build/exploded-bundles/ComAndroidSupportAppcompatV71901.aar

It turned out that the folder ComAndroidSupportAppcompatV71901.aar contains a file named .fuse_hidden0000175300000012 (or some other random file). I have googled for that and it seems that it is kind of filesystem link to a file that is marked for deletion but is still in use by some process. As I did lsof of that file, it showed that it is indeed in use... by Android Studio.

Is it somehow possible to tell Android Studio to release that file so it can be deleted?

I am using Android Studio 0.4.2 under Ubuntu 13.10, the filesystem is NTFS.

Nmk
  • 1,281
  • 2
  • 14
  • 25
fess89
  • 151
  • 1
  • 4
  • 6
    You're hitting bug https://code.google.com/p/android/issues/detail?id=61300, which we thought we'd fixed. There's also a duplicate at https://code.google.com/p/android/issues/detail?id=59284. The workaround is to quit Android Studio (which will of course release any file locks the process is holding), but it's too poor a workaround to merit me posting it as an answer. – Scott Barta Jan 10 '14 at 18:37
  • I assume this is no longer an issue in the latest version of android studio? – CasualT Aug 14 '15 at 18:20
  • Same issue in the Android Studio 1.3.1. It seems google has no plan to solve the problem. – codezjx Aug 24 '15 at 03:38
  • I hate to copypaste such things, but... Same issue in the Android Studio 14. It seems google has no plan to solve the problem. – ocramot Oct 20 '15 at 09:51
  • Yep. 1.5.1 still here.. :/ Only it didn't unlock the file when I quit Studio.. – Mullazman Feb 11 '16 at 07:59
  • http://stackoverflow.com/questions/32914499/error-execution-failed-for-task-appclean-unable-to-delete-file – PEHLAJ May 25 '16 at 11:11
  • Still happening in 2.1. – Halsafar Jul 18 '16 at 20:51

2 Answers2

0

try these solution one by one (if the first didnt work go to the second and so on):

1- kill the background Java process project and try again.

2- clean project from Terminal using this command 'gradlew clean'

3- Search for "Instant Run" in settings and uncheck the box.

4- try exiting the android studio and opening that again then clean and run

5- try invalidate cache and restart from file menu

Amir Ziarati
  • 14,248
  • 11
  • 47
  • 52
0

Just try starting android studio as Administrator on your computer.