Set the JDK version Open your project in Android Studio and select File > Settings… > Build, Execution, Deployment > Build Tools > Gradle (Android Studio > Preferences… > Build, Execution, Deployment > Build Tools > Gradle on a Mac). Under Gradle JDK, choose the Embedded JDK option. Click OK.
Read moreWhich Java JDK should I download for Android Studio?
Set the JDK version A copy of the latest OpenJDK comes bundled with Android Studio 2.2 and higher, and this is the JDK version we recommend you use for your Android projects.
Read more