In hindsight I should not have enabled L build stuff.
I am new to programming and I created a new Android Studio project which is throwing the Gradle errror right aw
For me Changing the JDK path worked. I changed it to /Library/Java/JavaVirtualMachines/jdk1.7.0_71.jdk/Contents/Home
in File--> ProjecStructure-> JDK location.