You need to configure your preferred version of JDK in Android Studio. I am using Andriod studio for Mac