# Android Gradle Plugin 9 AAR metadata minCompileSdk compileSdk consumer higher compileSdk official documentation

Status: search-observed
Product: Gradle 9 / Android Gradle Plugin 9
Last verified: 2026-06-25
Canonical HTML: https://gitdocs.org/fix/agp-9-library-aar-requires-consumer-to-use-higher-compilesdk
Machine JSON: https://gitdocs.org/api/fixes/agp-9-library-aar-requires-consumer-to-use-higher-compilesdk.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 AAR metadata minCompileSdk compileSdk consumer higher compileSdk official documentation
- site:developer.android.com build dependencies AAR metadata minCompileSdk
- AAR metadata minCompileSdk Android Gradle Plugin checkAarMetadata
- https://developer.android.com/build/publish-library/aar-metadata
- developer.android.com/reference/tools/gradle-api AarMetadata minCompileSdk
- AarMetadata minCompileSdk Android Gradle Plugin 9.0 reference tools gradle api
- "minCompileSdk" "AarMetadata"
- https://developer.android.com/reference/tools/gradle-api/com/android/build/api/dsl/AarMetadata

## 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/publish-library/aar-metadata
- Official reference opened by Codex: https://developer.android.com/reference/tools/gradle-api/com/android/build/api/dsl/AarMetadata
