I get this error when trying to build my project after changing laptop and updating to Android Studio version 0.8.2.
FAILURE: Build failed with an exc
I got this error when switching from one Git branch to another, and then trying to run "Clean Project". I used ack to search for the Task name, and found it in a .iml file.
My solution was to regenerate the project's .iml file by clicking (in the main menu) Tools > Android > Sync Project with Gradle Files. (Thanks to this answer.)