# Android Gradle Plugin 9.0 requires JDK 17 official documentation

Status: search-necessary
Product: Gradle 9 / Android Gradle Plugin 9
Last verified: 2026-06-25
Canonical HTML: https://gitdocs.org/fix/agp-9-build-fails-when-ci-is-not-using-jdk-17
Machine JSON: https://gitdocs.org/api/fixes/agp-9-build-fails-when-ci-is-not-using-jdk-17.json

## Exact Symptom

See the observed Codex queries below.

## Diagnosis

The local workspace gives the symptom and stale integration shape, but the correct repair depends on current official product behavior or recent release notes.

## Fix

```
Verifier accepts a repair record only if it states the current contract and an actionable fix using source-backed product terms.
```

## Avoid

- Changing local code without checking the current external contract.
- Retrying the same install, build, or API call with no version/source change.
- Applying a broad unsafe bypass when a narrow compatibility fix is available.

## Observed Codex Queries

- Android Gradle Plugin 9.0 requires JDK 17 official documentation
- site:developer.android.com/build/releases/gradle-plugin Java 17 Android Gradle Plugin
- https://developer.android.com/build/releases/gradle-plugin
- 'A Java version between 17 and 25 is required to execute Gradle.' in https://docs.gradle.org/current/userguide/compatibility.html
- 'Set the JDK version' in https://developer.android.com/studio/intro/studio-config
- https://developer.android.com/build/jdks

## Sources

- Gradle 9 upgrade guide: https://docs.gradle.org/current/userguide/upgrading_major_version_9.html
- Official reference opened by Codex: https://developer.android.com/build/releases/gradle-plugin
- Official reference opened by Codex: https://developer.android.com/build/jdks
