Android Gradle plugin 9.2.0 (April 2026)

Android Gradle plugin 9.2 is a minor release that includes a variety of new features and improvements.

Compatibility

The maximum API level that Android Gradle plugin 9.2 supports is API level 36.1. Here is other compatibility info:

Minimum version Default version Notes
Gradle 9.4.1 9.4.1 To learn more, see updating Gradle.
SDK Build Tools 36.0.0 36.0.0 Install or configure SDK Build Tools.
NDK N/A 28.2.13676358 Install or configure a different version of the NDK.
JDK 17 17 To learn more, see setting the JDK version.

Unified coverage and test reports

AGP 9.2.0-alpha07 introduces tasks to generate HTML dashboards that consolidate test results and coverage from various test types (unit and instrumentation), modules, and build variants, providing a comprehensive overview in a single dashboard. For more information, see Generate unified code coverage reports and View unified test reports.

R8 changes

The following R8 changes are included in AGP 9.2.0.

Stricter -keepattributes semantics for keeping runtime invisible annotations

Runtime invisible annotations cannot be read at runtime. D8 therefore unconditionally removes runtime invisible annotations, with no option to change this.

For compatibility with ProGuard, R8 supports outputting runtime invisible annotations. But when compiling to DEX, runtime invisible annotations should generally never be retained. However, it's common practice to include the convenient rule -keepattributes *Annotation* (either directly or indirectly from consumer keep rules) for R8 to keep runtime visible annotations. Unfortunately this also ends up keeping runtime invisible annotations.

To mitigate this problem and better match D8 behavior, -keepattributes patterns with wildcards no longer match RuntimeInvisibleAnnotations, RuntimeInvisibleParameterAnnotations, and RuntimeInvisibleTypeAnnotations. As a result, runtime invisible annotations will only be kept if the attribute name is mentioned explicitly without wildcards.

None of the following rules will now keep runtime invisible annotations:

-keepattributes *
-keepattributes *Annotation*
-keepattributes *Invisible*

To keep runtime invisible annotations, use the following rule:

-keepattributes RuntimeInvisibleAnnotations,
                RuntimeInvisibleParameterAnnotations,
                RuntimeInvisibleTypeAnnotations

Support for negated names in member rules

The configuration language has been extended so that you can now match on negated member name patterns.

For example, to match all methods that don't end in "ForTesting" use the following rule:

-keepclassmembers class com.example.MyClass {
  *** !*ForTesting(...);
}

Member name patterns can also be negated in the precondition of -if rules. If a negated member name pattern contains wildcards, such wildcards cannot be back-referenced in the -if consequent rule.

Fixed issues

Android Gradle plugin 9.2.0-alpha04

Fixed Issues
Android Gradle Plugin
Renaming APK using new AGP DSL
Error when accessing (but not evaluating) bootClasspath IllegalStateException: targetCompatibility is not yet finalized

Android Gradle plugin 9.2.0-alpha03

Fixed Issues
Android Gradle Plugin
JdkImageTransform failure with JDK 26
Automatically encode minAgpVersion in the AAR metadata in AGP 10.0
Lint
Truncated context window in Lint SARIF reports due to stuck offset pointer in `SarifReporter.kt`
Lint Gradle client is missing a critical feature making it unreliable at best
Lint Integration
Lint Gradle tasks ignore --quiet flag

Android Gradle plugin 9.2.0-alpha02

Fixed Issues
Android Gradle Plugin
AGP 9.0 No androidComponents.onVariant equivalent for applicationVariants.all.mergeAssetsProvider
`*.xml.flat` files contain absolute file paths
R8D8ThreadPoolBuildService not registered
Lint Integration
Android Lint fails with custom lint checks compiled to Java 21 bytecode

Android Gradle plugin 9.2.0-alpha01

Fixed Issues
Android Gradle Plugin
Warn users if they have commonTest but forget withHostTestBuilder
[fused lib - public] OkHttp includes sources
Cannot run androidDeviceTest with manifest placeholders in library (AGP 9.0.0 with com.android.kotlin.multiplatform.library plugin)
AGP should warn if user has src/androidDeviceTest/java with java disabled
Lint
Lint typo in message