Reputation: 418
I have a problem with my Android studio 2. That's whenever I want to clean or rebuild my android project, I always get this message
Error:Execution failed for task ':app:clean'. Unable to delete directory: C:\Users\MyPC\Desktop\SharePlace\app\build\intermediates
and can not fix it. what I only can do is go to File explorer and delete it. then come back android studio and rebuild again. Sometime, that way also does not work. I need some help to fix that Android studio. Please. Thank inadvance!
Upvotes: 2
Views: 7429
Reputation: 61
Found the solution. For windows, goto Task Manager and find your Android Studio. Expand it and end task for OpenJDK Platform Binary as depicted below
Then re-run your app in Android Studio again. It should work, and you don't have to restart your Android Studio all the time. More productivity~
Upvotes: 0
Reputation: 13
Manually deleted folder( build\generated and build\intermediates) after closing android studio works for me.
Upvotes: 0
Reputation: 249
I got a lot of faults like this.
Try to refresh all gradle projects: in Android Studio click on the "Gradle" tab on the right side of the window. When the gradle menu is shown, click on two blue mixed arrows icon. Then wait a moment until gradle completes refreshing and try cleaning or rebuilding again.
Upvotes: 4
Reputation:
Solution 1 :
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.
Solution 2 :
You need to go to the source file directly. Close the studio and go to the path the issue is located at and delete the folder there.
Upvotes: 4