I\'m having lots of problems with Gradle and Android Studio.
Making changes in any resource in the project can randomly give an exception during compilation, this is
run this command in your terminal in respective project.
./gradlew assembleDebug
this will give information about the error.(go line by line to verify)
In my case the error is related to JAR file that i have included in my gradle file.Finally removing the jar file solved the problem.