Android Gradle Plugin 8.5.0 is a major release that includes a variety of new features and improvements.

## Compatibility

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

<br />

|                 | Minimum version | Default version |                                                                                                        Notes                                                                                                        |
|----------------:|:---------------:|:---------------:|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|
|          Gradle |       8.7       |       8.7       |                                       To learn more, see[updating Gradle](https://developer.android.com/build/releases/gradle-plugin?buildsystem=ndk-build#updating-gradle).                                        |
| SDK Build Tools |     34.0.0      |     34.0.0      |                           [Install](https://developer.android.com/studio/intro/update#sdk-manager)or[configure](https://developer.android.com/tools/releases/build-tools)SDK Build Tools.                           |
|             NDK |       N/A       |  26.1.10909125  | [Install](https://developer.android.com/studio/projects/install-ndk#specific-version)or[configure](https://developer.android.com/studio/projects/install-ndk#apply-specific-version)a different version of the NDK. |
|             JDK |       17        |       17        |                                                     To learn more, see[setting the JDK version](https://developer.android.com/studio/intro/studio-config#jdk).                                                      |

<br />

## Fixed issues

<br />

### Android Gradle plugin 8.5.2

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Fixed Issues                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        ||
|---------------------------| |
| **Android Gradle Plugin** | |--------------------------------------------------------------------------------------------------------------------------------------------------| | [Issue #355397971](https://issuetracker.google.com/issues/355397971) AGP 8.5: Many more "mergeDebugResources" tasks are run, slowing down builds | | [Issue #352352252](https://issuetracker.google.com/issues/352352252) Adding srcs dir via Variant API not working as expected                     |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| **Dexer (D8)**            | |----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Issue #343136777](https://issuetracker.google.com/issues/343136777) java.lang.VerifyError: Verifier rejected class com.pax.log.LogUtils: java.lang.StackTraceElement com.pax.log.LogUtils.getCaller(com.pax.log.b, java.lang.StackTraceElement\[\], int) failed to verify |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| **Lint**                  | |-----------------------------------------------------------------------------------------------------------------------------------| | [Issue #347356457](https://issuetracker.google.com/issues/347356457) Lint: SetTextI18n complains about assigning an empty string. |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| **Shrinker (R8)**         | |-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Issue #348785664](https://issuetracker.google.com/issues/348785664) \[r8 8.5\]r8 horizontal class merge causes verify error on Android5 when disable api modeling          | | [Issue #347676160](https://issuetracker.google.com/issues/347676160) A Wear OS release built with Gradle Plugin 8.4.0/8.5.0 may cause java.lang.IllegalAccessError          | | [Issue #348202700](https://issuetracker.google.com/issues/348202700) \[r8 8.5\] vertical class merger causing runtime NPE                                                   | | [Issue #347739663](https://issuetracker.google.com/issues/347739663) Gradle Sync with AGP 8.6.0-alpha06 fails with "Unexpected backport missing from Android U" error in R8 | | [Issue #354625681](https://issuetracker.google.com/issues/354625681) The dex file generated by R8 shows "Unable to find static main(String\[\]) in 'Test'" when executed    | | [Issue #354625682](https://issuetracker.google.com/issues/354625682) Different Behavior Between Programs packed by R8 and D8                                                | | [Issue #354878031](https://issuetracker.google.com/issues/354878031) R8 (AGP 8.5.0+) fails with error "Unexpected rewriting of item: ... to two distinct items:..."         | | [Issue #348499741](https://issuetracker.google.com/issues/348499741) R8 Processing Error Possibly Due to Right Shift Operator                                               | | [Issue #353475583](https://issuetracker.google.com/issues/353475583) R8 NullPointer after updating to Kotlin 2.0                                                            | |

### Android Gradle plugin 8.5.1

|                                                                                                                                                                    Fixed Issues                                                                                                                                                                    ||
|---------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **Android Gradle Plugin** | |---------------------------------------------------------------------------------------------------------------------------------------------------------| | [Issue #341266993](https://issuetracker.google.com/issues/341266993) \[Koala 2024.1.2 Canary 2\] Error running a baseline profile module on a split APK | |

### Android Gradle plugin 8.5.0

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       Fixed Issues                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       ||
|---------------------------| |
| **Android Gradle Plugin** | |----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Issue #73450622](https://issuetracker.google.com/issues/73450622) AAPT: error: attribute 'package' intag is not a valid Android package name: 'butterknife'.                                                  | | [Issue #330593433](https://issuetracker.google.com/issues/330593433) AGP 8.3 breaks zipApksFor Task                                                                                                            | | [Issue #330789849](https://issuetracker.google.com/issues/330789849) Privacy Sandbox Proguard rule generation fails on empty sdk provider classname                                                            | | [Issue #319822816](https://issuetracker.google.com/issues/319822816) Compose preview unable to resolve classes from transitive dependency                                                                      | | [Issue #331806519](https://issuetracker.google.com/issues/331806519) JavaPreCompileTask includes KSP classpath dependencies when computing non-incremental annotation processors                               | | [Issue #332731575](https://issuetracker.google.com/issues/332731575) Execution failed for task ':app:generateDebugLocaleConfig'.                                                                               | | [Issue #266599585](https://issuetracker.google.com/issues/266599585) DexingNoClasspathTransform (minSdk \>= 24) with Java 11 target fails due to missing nest members                                          | | [Issue #335449140](https://issuetracker.google.com/issues/335449140) With \`android.useFullClasspathForDexingTransform = true\`, the build fails with \`Found multiple transforms that can produce a variant\` | | [Issue #337848180](https://issuetracker.google.com/issues/337848180) Errors when running lint with and without K2 UAST                                                                                         | |
| **Lint**                  | |--------------------------------------------------------------------------------------------------------------| | [Issue #331666842](https://issuetracker.google.com/issues/331666842) buildList - False Positive Lint warning |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| **Lint Integration**      | |-------------------------------------------------------------------------------------------------------------------| | [Issue #330911660](https://issuetracker.google.com/issues/330911660) Lint unable to disambiguate a KMP dependency |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |

<br />