Android Gradle Plugin 8.2.0 (Nov 2023)

Android Gradle plugin 8.2.0 is a major release that includes a variety of new features and improvements.


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

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

New macro to specify JDK path

#GRADLE_LOCAL_JAVA_HOME is a new macro that you can use to specify the JDK path. This makes it safer and easier to specify the Java home path used for the Gradle daemon (background process) execution for your project. The path selection is stored in the java.home field in the .gradle/ file. Set this field through Gradle JDK settings in Android Studio: File (or Android Studio on macOS) > Settings > Build, Execution, Deployment > Build Tools > Gradle.

New projects will use #GRADLE_LOCAL_JAVA_HOME by default. Existing projects will automatically be migrated to the new macro after a successful sync unless you're already using a macro like #JAVA_HOME.

The main benefits of the new macro are as follows:

  • You can manually modify the JDK path to trigger sync without opening your project first.
  • Fewer errors related to incompatible Gradle and project JDK versions since there is a single source of truth for your Gradle JDK selection.