Download and install latest JDK(currently its 8) from java official site in case you are using previous versions. Then in Android Studio go to File->Project Structure->SDK location -> JDK location and set it to ‘C:\Program Files\Java\jdk1. 8.0_121’ (Default location of JDK).
Read moreHow do I find my JDK path on Mac?
“how to check java path in mac” Code Answer
Read more