I am getting the exception below when I am trying to run the application using Android Studio:
Error:Execution failed for task \':app:transformClasses
Just fixed this issue. In my case, rebuilding the project helped for me. So, try to rebuild your project.
in my case - Clean Project and Rebuild
For me closing all other Android Studio solved the problem.
I had opened 3 android studios when I was getting the error, after I closed 2 I didn't get any error.
No need to add any code related to multiDex !
Seems like there was some memory issue related to jvm.
At my case change buildToolsVersion from "24" to "23.0.2", solve the problem. This will solve the problem especially if you're using old Android Studio less than version 2.