Plug-in Android per Gradle 8.9.0 (marzo 2025)

Il plug-in Android per Gradle 8.9.0 è una release principale che include una serie di nuove funzionalità e miglioramenti.

Compatibilità

Il livello API massimo supportato dal plug-in Android per Gradle 8.9 è il livello API 35. Ecco altre informazioni sulla compatibilità:

Versione minima Versione predefinita Note
Gradle 8.11.1 8.11.1 Per saperne di più, consulta la sezione Aggiornare Gradle.
Strumenti di build dell'SDK 35.0.0 35.0.0 Installa o configura gli strumenti di compilazione dell'SDK.
NDK N/D 27.0.12077973 Installa o configura una versione diversa dell'NDK.
JDK 17 17 Per saperne di più, consulta la sezione Impostare la versione JDK.

Problemi risolti

Plug-in Android per Gradle 8.9.2

Problemi risolti
Shrinker (R8)
Resource Shrinking Issue in AGP 8.9 Causing Missing Resources in Dynamic Feature Modules
ClassCastException from a safe cast in class init
Cannot invoke com.android.tools.r8.internal.H5.x()

Plug-in Android per Gradle 8.9.1

Problemi risolti
Dexer (D8)
Backporting of android.os.Build.VERSION_CODES_FULL incorrect for Baklava
Shrinker (R8)
Unable to Generate Signed APK after updating to AGP 8.9.0
Analyze written-before-read property at allocation sites encounters error when generating classfile
Problem regarding Java SPI in R8 shrinker of versions 8.6.*, 8.7.*, 8.8.0

Plug-in Android per Gradle 8.9.0

Problemi risolti
Plug-in Android per Gradle
Provide an actionable error message when GMD setup task fails with insufficient disk space
com.android.settings plugin doesn't recognize targetSdk
Unhelpful error ''compileSdkVersion is not specified. Please add it to build.gradle"
Missing "Clean build" in Build menu
Maybe let AGP's built-in Kotlin support auto-add kotlin stdlib dependency
Update shouldConfigureKotlinPlatformAttribute to handle built-in kotlin support
Give kotlin gradle syntax in error message for `checkTestedAppObfuscationRelease`
Fused Library error when unresolved dependency could be improved
System Properties from gradle.properties are not passed to R8 Gradle Workers in separate processes
Make BuiltArtifact.outputFile as File type
Not providing namespace on fused library does not give a good error message
lint options in AGP 7.1.0-alpha08 doesn't allow for stdout
Android Gradle Plugin: Variants should expose source set names
Configuration cache is brittle to the setting of the TERM environment variable
AndroidComponentsExtension.addSourceSetConfigurations broken when stats are enabled
Initialization script 'C:\Users\mypc\AppData\Local\Temp\ijresolvers2.gradle' line: 162
AndroidComponentsExtension.addSourceSetConfigurations broken when stats are enabled
Dexer (D8)
java.lang.VerifyError: Verifier rejected class: [0x430] copy1 v2<-v264 type=Undefined cat=3
Lint
Lint crashes with Lint gradle checks
Lint fails with InstantiationException without exception message in lint stacktrace
False positive lint check android.permission.SCHEDULE_EXACT_ALARM is only granted to system apps
StringFormatInvalid check should be applied to Compose stringResource method
RequiresFeature annotation does not work for Kotlin files
kotlin android.os.Handler removeCallbacks Runnable
WrongConstant lint on definition instead of usage of constant using shift
WrongConstant lint appearing twice
Runtime exception below API 26 with unsupported Java nio API (with no lint error)
Lint prevents usage of RequiresApi even on private helper method in test
K2 Mode throws RestrictedApi warning when using .hasRoute(Route::class) in Android Studio
Lint suggests replacing @RequiresExtension on test with @SdkSuppress, which doesn't support SDK extensions
Lint incorrectly reports an uncessary nested layout when a FrameLayout used with fitSystemWindows to wrap a child RelativeLayout that that requires custom padding.
CoarseFineLocation lint rule doesn't account for a maxSdkVersion attribute
AppLinkSplitToWebAndCustom is UnknownIssue in lint 8.7.3
Lint check StringEscapeDetector crash on "\\ "
Wrong lint warning for `@Parcelize` annotation on sealed interfaces
AS 2024.3.1.4 hang intermittently when editing kotlin texts.
Integrazione di Lint
lintVitalRelease doesn't run automatically when building app bundle
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