Android Studio JDK & Gradle checker which Java version does my project need?
Pick your Android Studio or Android Gradle plugin (AGP) version and see the Gradle version and JDK it needs, with the exact lines to paste. Or paste a build error and get the fix.
Data from the official Android Gradle plugin and Gradle compatibility tables, checked on 1 December 2026.
Do you need to install Java for Android Studio?
No. Android Studio comes with its own JDK, the JetBrains Runtime (JBR), and new projects use it automatically. You only need a separate Java download if you build from a terminal without Android Studio, or if your company requires a specific JDK.
There are three different “Java versions” in an Android project, and most errors come from mixing them up:
- Gradle JDK – the Java that runs Gradle and the Android Gradle plugin. AGP 8.0 and newer need JDK 17 or newer. Set it in Settings › Build, Execution, Deployment › Build Tools › Gradle › Gradle JDK.
- Source and target compatibility – the Java language level your code is compiled for (
JavaVersion.VERSION_17,jvmToolchain(17)). - JAVA_HOME – used when you run
./gradlewin a terminal. Point it to the same JDK as Android Studio to avoid surprises.
AGP, Gradle and JDK versions
| AGP | Minimum Gradle | Minimum JDK |
|---|---|---|
| 9.5 | 9.6.0 | 17 |
| 9.4 | 9.6.0 | 17 |
| 9.3 | 9.5.0 | 17 |
| 9.2 | 9.4.1 | 17 |
| 9.1 | 9.3.1 | 17 |
| 9.0 | 9.1.0 | 17 |
| 8.11 – 8.13 | 8.13 | 17 |
| 8.9 – 8.10 | 8.11.1 | 17 |
| 8.8 | 8.10.2 | 17 |
| 8.7 | 8.9 | 17 |
| 8.5 – 8.6 | 8.7 | 17 |
| 8.4 | 8.6 | 17 |
| 8.3 | 8.4 | 17 |
| 8.2 | 8.2 | 17 |
| 8.0 – 8.1 | 8.0 | 17 |
| 7.4 | 7.5 | 11 |
| 7.0 – 7.3 | 7.0 – 7.4 | 11 |
Newest Java each Gradle version can run on
| Java | Gradle needed to run on it |
|---|---|
| 17 | 7.3 or newer |
| 21 | 8.5 or newer |
| 23 | 8.10 or newer |
| 24 | 8.14 or newer |
| 25 | 9.1.0 or newer |
| 26 | 9.4.0 or newer |
Gradle 9 itself needs at least Java 17 to run. If you see Unsupported class file major version 65, subtract 44 to get the Java version (65 → Java 21): your Gradle is too old for that JDK.
Minimum AGP for each compileSdk
| API level | Minimum Android Studio | Minimum AGP |
|---|---|---|
| 37 | Panda 3 (2025.3.3) Patch 1 | 9.1.1 |
| 36.1 | Narwhal 3 Feature Drop (2025.1.3) | 8.13.0 |
| 36 | Meerkat (2024.3.1) Patch 1 | 8.9.1 |
| 35 | Koala Feature Drop (2024.1.2) | 8.6.0 |
| 34 | Hedgehog (2023.1.1) | 8.1.1 |
New to Android Studio? Start with our guide to downloading and installing Android Studio on Windows 11 and our Android Studio, JDK and SDK setup guide, then follow the free Kotlin course.
More free tools you may like
Gradle Version Catalog
Convert dependencies and plugins to libs.versions.toml.
Open tool →Version Bumper
Next SemVer version, versionCode and build numbers with snippets.
Open tool →Compose Button Generator
Design a Material 3 button and copy the Kotlin code.
Open tool →Compose Text Style Generator
Underline, bold, strikethrough and links for Compose Text.
Open tool →App Icon Generator
Every Android, iOS (Xcode) and web icon size from one image, in one ZIP.
Open tool →Store Listing Preview
Character counter and live preview for Google Play and App Store listings.
Open tool →Frequently asked questions
Which JDK version does Android Studio need?
Android Studio ships with its own JDK (JetBrains Runtime), so you do not need to install one. For building, Android Gradle plugin 8.0 and newer need JDK 17 or newer; AGP 7.x needs JDK 11. JDK 17 or 21 works for almost every current project.
Do I need to download Java separately for Android Studio?
No. The bundled JetBrains Runtime is used by default for both the IDE and Gradle. Install a separate JDK only if you build from a terminal without Android Studio or your team requires a specific vendor.
How do I change the JDK in Android Studio?
Open File › Settings (Android Studio › Settings on Mac) › Build, Execution, Deployment › Build Tools › Gradle and choose a JDK under Gradle JDK. GRADLE_LOCAL_JAVA_HOME uses the bundled JetBrains Runtime. Sync the project afterwards.
How do I fix “Android Gradle plugin requires Java 17 to run”?
Your Gradle JDK is older than 17. Set Gradle JDK to 17 or newer in the Gradle settings above, and if you build in a terminal, set JAVA_HOME to the same JDK.
What does “Unsupported class file major version 65” mean?
Subtract 44 from the number to get the Java version: 65 is Java 21, 69 is Java 25. It means your Gradle version is too old to run on that Java. Update Gradle (Java 21 needs Gradle 8.5+, Java 25 needs 9.1+) or pick an older Gradle JDK.
Can I use JDK 25 with Android Studio?
Yes, if your Gradle version supports it. Gradle 9.1.0 or newer can run on Java 25, which means AGP 9.0 or newer in practice. Older projects should stay on JDK 17 or 21.
Which Android Studio do I need for AGP 9?
AGP 9.0 needs Android Studio Otter 3 Feature Drop (2025.2.3) or newer. AGP 9.5, the newest version when we checked (December 2026), needs Android Studio Rabbit 2 (2026.2.2).
Stuck on a build error?
We build and fix Android apps for clients worldwide – clear scope, fixed price, fast delivery.
Techpass Master Technologies · Websites, Android apps and digital marketing
