Android Gradle Plugin 8.8.0 (January 2025)

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

Compatibility

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

Minimum version Default version Notes
Gradle 8.10.2 8.10.2 To learn more, see updating Gradle.
SDK Build Tools 35.0.0 35.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.

Fixed issues

Android Gradle plugin 8.8.0

Fixed Issues
Android Gradle Plugin
Consider annotate input type for JacocoTransform as a @Classpath
com.android.build.api.variant.GeneratesApk should expose minSdk
com.android.settings plugin doesn't recognize targetSdk
SourceDirectories.addGeneratedSourceDirectory is not friendly to multiple variants
Implement flag to disable AGP minimum version checking
AGP has confusing interactions with configuring kotlin compiler options
AGP should expose a BuiltArtifactLoader for target project apk in com.android.test projects
[AGP] Lazy SdkComponents.ndkDirectory provider fails to produce value, but eager android.ndkDirectory API works
Build options: Add new "Build Run configuration" option and make it the default
BuildConfig can not be resolved in unit tests when using android.enableBuildConfigAsBytecode=true
Apks generated from Bundles does not consider privacy sandbox support
com.android.settings plugin doesn't recognize targetSdk
Dexer (D8)
Desugar library 2.1.0 does not work with AGP 8.5.2
Lint
KtAnalysisSessionProvider incompatibility with lint checks introduced in 8.7.0-alpha04
"False positive" WrongConstant when using PackageManager.ResolveInfoFlags.of with Kotlin
"At least one host must be specified" lint error when setting http or https intent-filter scheme
Handle type-use annotations in more cases for UnknownNullness lint
AGP 8.6.1: Regression - WrongConstant lint failure when using [Int].toLong() inside a @LongDef in Kotlin
AGP 8.7.0 - Lint False Positive RestrictedApi on NavOptionsBuilder.popUpTo
WrongConstant lint appearing twice
"MonochromeLauncherIcon: Monochrome icon is not defined" warning is not caught by Android Studio
AbstractAnnotationDetector checks wrong overloaded functions/constructors
Lint ImportAliasTestMode doesn't create import aliases for top level functions
WrongConstant lint appearing twice
New ObsoleteSdkInt lint warnings with AGP 8.8
False positive lint check android.permission.SCHEDULE_EXACT_ALARM is only granted to system apps
K2 Mode throws RestrictedApi warning when using .hasRoute(Route::class) in Android Studio
Lint Integration
Lint variant task is not found after evaluation
Linting fails when importing AAR file with implemenation files

Android Gradle plugin 8.8.1

Fixed Issues
Dexer (D8)
Add OpenJDK 23 for testing
Shrinker (R8)
java.lang.AbstractMethodError: Receiver class [...]$$Lambda$[...] does not define or inherit an implementation of the resolved method [...] of interface [...]
NPE in Enqueuer releated to record DexCallSite
R8 8.7.18 causes a runtime null pointer exception when calling job?.cancel
java.lang.NoClassDefFoundError: Failed resolution of: Lkotlin/LazyThreadSafetyMode
Monzo appears to be using excessive amount of time in tree shaking
AGP 8.8 fail release build : R8: java.lang.NullPointerException: Cannot read field "b" because the return value of "com.android.tools.r8.internal.BS.a(com.android.tools.r8.internal.cR)" is null`

Android Gradle plugin 8.8.2

Fixed Issues
Android Gradle Plugin
Initialization script 'C:\Users\mypc\AppData\Local\Temp\ijresolvers2.gradle' line: 162
Shrinker (R8)
Gson proguard is not working properly after upgrading to AGP 8.8
java.lang.VerifyError: Verifier rejected class
Leanback crashes when minified with R8 included in AGP 8.10.0-alpha04