Android Gradle Plugin 8.7.0 (October 2024)

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

Compatibility

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

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

Lint behavior change

Starting with Android Gradle Plugin 8.7.0-alpha08, if there is a LintError when running lint using Gradle, the lint analysis task throws an exception. This change prevents rare errors from being cached in the build cache.

Unfortunately, this change breaks builds for projects with genuine LintError instances in their lint baseline files. The error message contains information about which lint checks are causing the problem. In some cases, updating the corresponding library dependency might resolve the problem. If not, you can disable the problematic lint check until the library author fixes it.

Fixed issues

Android Gradle plugin 8.7.0

Fixed Issues
Android Gradle Plugin
AGP should claim that it supports API 35 that is about to ship
AGP 8.5: Many more "mergeDebugResources" tasks are run, slowing down builds
Make ndk 27 the default NDK in AGP.
AGP should claim that it supports API 35 that is about to ship
AGP should claim that it supports API 35 that is about to ship
Running Android lint failed with NoSuchFileException
BuildType#initWith copies postprocessing block but proguard configuration is not applied
Cannot merge for foregroundServiceType tags
Running Android lint failed with NoSuchFileException
Lint
Lint should check for invalid objects used as ViewGroups
"android:host is missing" for uris with null host
KtAnalysisSessionProvider incompatibility with lint checks introduced in 8.7.0-alpha04
"False positive" WrongConstant when using PackageManager.ResolveInfoFlags.of with Kotlin

Android Gradle plugin 8.7.1

Fixed Issues
Android Gradle Plugin
agp docs have a lot of TBD
Lint
AGP 8.6.1: Regression - WrongConstant lint failure when using [Int].toLong() inside a @LongDef in Kotlin
"At least one host must be specified" lint error when setting http or https intent-filter scheme

Android Gradle plugin 8.7.2

Fixed Issues
Lint
AGP 8.7.0 - Lint False Positive RestrictedApi on NavOptionsBuilder.popUpTo
Shrinker (R8)
[R8 8.6.27] Method implementation replaced with `throw null`
Default android proguard files throw a warning when used with current Version of R8
MissingStartupProfileItemsDiagnostic crashes the Gradle client with an out-of-memory error if the message is too large

Android Gradle plugin 8.7.3

Fixed Issues
Lint
Many missing analysis API method warnings when running lint
False positive lint check android.permission.SCHEDULE_EXACT_ALARM is only granted to system apps