I am new to Android Studio.I installed Android Studio-1.2.1.1 and i have jdk1.7.0_40 installed.I am facing problem with gradle build. For reference you can check gradle issu
Solved this by going to File -> Project Structure -> SDK Location
and under JDK Location, update with Gradle SDK location.