Android Gradle plugin release notes

The JCenter repository became read-only on March 31st, 2021. For more information, see JCenter service update.

The Android Studio build system is based on Gradle, and the Android Gradle plugin adds several features that are specific to build Android apps. Although the Android plugin is typically updated in lock-step with Android Studio, the plugin (and the rest of the Gradle system) can run independent of Android Studio and be updated separately.

This page explains how to keep your Gradle tools up to date and what's in the recent updates. For the release notes for past Android Gradle plugin versions, see past release notes.

For a high-level summary of upcoming breaking changes in the Android Gradle plugin, see the Android Gradle plugin roadmap.

For details about how to configure your Android builds with Gradle, see the following pages:

For more information about the Gradle build system, see the Gradle user guide.

Update the Android Gradle plugin

When you update Android Studio, you may receive a prompt to automatically update the Android Gradle plugin to the latest available version. You can choose to accept the update or manually specify a version based on your project's build requirements.

You can specify the plugin version in either the File > Project Structure > Project menu in Android Studio, or the top-level build.gradle.kts file. The plugin version applies to all modules built in that Android Studio project. The following example sets the plugin to version 8.0.0 from the build.gradle.kts file:


plugins {
    id("") version "8.0.0" apply false
    id("") version "8.0.0" apply false
    id("") version "1.5.31" apply false


plugins {
    id '' version '8.0.0' apply false
    id '' version '8.0.0' apply false
    id '' version '1.5.31' apply false

Caution: You should not use dynamic dependencies in version numbers, such as ''. Using this feature can cause unexpected version updates and difficulty resolving version differences.

If the specified plugin version has not been downloaded, Gradle downloads it the next time you build your project or click File > Sync Project with Gradle Files from the Android Studio menu bar.

Update Gradle

When you update Android Studio, you may receive a prompt to also update Gradle to the latest available version. You can choose to accept the update or manually specify a version based on your project's build requirements.

The following table lists which version of Gradle is required for each version of the Android Gradle plugin. For the best performance, you should use the latest possible version of both Gradle and the plugin.

Plugin versionMinimum required Gradle version

Older versions

Plugin versionRequired Gradle version
3.6.0 -
3.5.0 -
3.4.0 -
3.3.0 -
3.2.0 -
2.1.3 - - 3.5
2.0.0 - - 2.13 - 2.13
1.2.0 - - 2.9
1.0.0 - - 2.3

You can specify the Gradle version in either the File > Project Structure > Project menu in Android Studio, or update your Gradle version using the command line. The preferred way is to use the Gradle Wrapper command line tool, which updates the gradlew scripts. The following example sets the Gradle version to 8.0 using the Gradle Wrapper. Note, you need to run this command twice to upgrade both Gradle and the Gradle Wrapper itself (for more information, see Upgrading the Gradle Wrapper).

gradle wrapper --gradle-version 8.0

However this might fail in some cases, for example if you've just updated AGP and it's no longer compliant with the current Gradle version. In this case, you need to edit the Gradle distribution reference in the gradle/wrapper/ file. The following example sets the Gradle version to 8.0 in the file.

distributionUrl = https\://

Android Gradle plugin and Android Studio compatibility

The Android Studio build system is based on Gradle, and the Android Gradle plugin (AGP) adds several features that are specific to building Android apps. The following table lists which version of AGP is required for each version of Android Studio.

Android Studio version Required AGP version
Hedgehog | 2023.1.1 3.2-8.2
Giraffe | 2022.3.1 3.2-8.1
Flamingo | 2022.2.1 3.2-8.0
Electric Eel | 2022.1.1 3.2-7.4
Dolphin | 2021.3.1 3.2-7.3

Older versions

Android Studio version Required AGP version
Chipmunk | 2021.2.1 3.2-7.2
Bumblebee | 2021.1.1 3.2-7.1
Arctic Fox | 2020.3.1 3.1-7.0

For information on what’s new in the Android Gradle plugin, see the Android Gradle plugin release notes.

Versioning changes (November 2020)

We are updating the version numbering for Android Gradle plugin (AGP) to more closely match the underlying Gradle build tool.

Here are the notable changes:

  • AGP will now use semantic versioning, and breaking changes will be targeted for major releases.

  • There will be one major version of AGP released per year, aligned with the Gradle major release.

  • The release after AGP 4.2 will be version 7.0 and will require an upgrade to Gradle version 7.x. Every major release of AGP will require a major version upgrade in the underlying Gradle tool.

  • APIs will be deprecated approximately one year in advance, with replacement functionality made available concurrently. Deprecated APIs will be removed approximately one year later during the subsequent major update.

8.0.0 (April 2023)

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


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

Patch releases

The following is a list of the patch releases for Android Gradle Plugin 8.0.

Android Gradle Plugin 8.0.2 (May 2023)

For a list of bugs fixed in AGP 8.0.2, see the Android Studio 2022.2.1 closed issues.

Android Gradle Plugin 8.0.1 (May 2023)

This minor update includes the following bug fixes:

Fixed issues
Error: "No VersionRequirement with the given id in the table" after upgrading AGP 7.2.2 -> 7.4.0
R8 NullPointerException at markTypeAsLive AGP 7.4.1
[R8 4.0.53] Hard class verification failure on Android 11

Breaking change: namespace required in module-level build script

You must set the namespace in the module-level build.gradle.kts file, rather than the manifest file. You can start using the namespace DSL property starting with AGP 7.3. To learn more, see Set a namespace.

When migrating to the namespace DSL, be aware of the following issues:

  • Previous versions of AGP infer the test namespace from the main namespace, or application ID, incorrectly in some cases. The AGP Upgrade Assistant blocks the upgrade if it finds that your project's main namespace and test namespace are the same. If the upgrade is blocked, you need to manually change testNamespace and modify your source code accordingly.
  • After you change the test namespace, it's possible that your code compiles but your instrumented tests fail at runtime. This can happen if your instrumented test source code references a resource defined in both your androidTest and app sources.

For more information, see issue #191813691 comment #19.

Breaking changes: build option default values

Starting with AGP 8.0, the default values for these flags have changed to improve build performance. To get help adjusting your code to support some of these changes, use the AGP Upgrade Assistant (Tools > AGP Upgrade Assistant). The Upgrade Assistant guides you through updating your code to accommodate the new behavior or setting flags to preserve the previous behavior.

Flag New default value Previous default value Notes
android.defaults.buildfeatures.buildconfig false true AGP 8.0 doesn't generate BuildConfig by default. You need to specify this option using the DSL in the projects where you need it.
android.defaults.buildfeatures.aidl false true AGP 8.0 doesn't enable AIDL support by default. You need to specify this option using the DSL in the projects where you need it. This flag is planned to be removed in AGP 9.0.
android.defaults.buildfeatures.renderscript false true AGP 8.0 doesn't enable RenderScript support by default. You need to specify this option using the DSL in the projects where you need it. This flag is planned to be removed in AGP 9.0.
android.nonFinalResIds true false AGP 8.0 generates R classes with non-final fields by default.
android.nonTransitiveRClass true false AGP 8.0 generates R classes for resources defined in the current module only.
android.enableR8.fullMode true false AGP 8.0 enables R8 full mode by default. For more details, see R8 full mode.

Breaking changes: enforced build option values

Starting with AGP 8.0, you can no longer change the values for these flags. If you specify them in the file, the value is ignored and AGP prints warnings.

Flag Enforced value Notes
android.dependencyResolutionAtConfigurationTime.warn true AGP 8.0 emits a warning if it detects configuration resolution during the configuration phase because it negatively impacts Gradle configuration times.
android.r8.failOnMissingClasses true AGP 8.0 fails builds that use R8 if there are missing classes to ensure better DEX optimization. To address this, you need to add the missing libraries or -dontwarn keep rules. For more details, see Missing class warnings in R8 shrinker.
android.testConfig.useRelativePath true When support for using Android resources, assets, and manifests in unit tests is enabled, AGP 8.0 generates a file that contains only relative paths. This ensures that Android unit tests can always use the Gradle build cache.
android.useNewJarCreator true AGP uses the Zipflinger library when creating JAR files to improve build performance.
android.bundletool.includeRepositoriesInDependencyReport true When adding SDK dependency information in AABs and APKs is enabled, AGP 8.0 also adds a list of project repositories to this information. To learn more, see Dependency information for Play Console.
android.enableArtProfiles true Baseline profiles are now always generated. See Baseline Profiles for details.
android.enableNewResourceShrinker true Use the new resource shinker implementation by default. The new resource shrinker includes support for dynamic features.
android.enableSourceSetPathsMap true Used for computing relative resource path mappings, so Gradle builds are up-to-date more often.
android.cacheCompileLibResources true Compiled library resources can now be cached by default because Gradle tracks resources files relative to the project location. Requires android.enableSourceSetPathsMap to be enabled.
android.disableAutomaticComponentCreation true AGP 8.0 creates no SoftwareComponent by default. Instead AGP creates SoftwareComponents only for variants that are configured to be published using the publishing DSL.

New stable flag for execution profile

AGP includes the new flag android.settings.executionProfile. Use this flag to override the default execution profile from the SettingsExtension. To learn more, see the settings plugin documentation.

To preview experimental flags, see the preview release notes.

Kotlin lazy property assignment not supported

If you're using Gradle's Kotlin DSL for your build scripts, note that Android Studio and AGP 8.0 don't support the experimental property assignment using the = operator. For more information about this feature, see the release notes and documentation.

Build Analyzer task categories

Starting with Android Studio Flamingo, Build Analyzer has a new default view for tasks that impact build duration. If your project uses AGP 8.0 or higher, instead of displaying tasks individually, Build Analyzer groups them by category. For example, tasks specific to Android Resources, Kotlin, or Dexing are grouped together and then sorted by build duration. This makes it easy to know what category has the most impact on build time. Expanding each category displays a list of the corresponding tasks. To display tasks individually, without grouping, use the Group by drop-down.

Build Analyzer task categories.

New settings plugin

AGP 8.0.0-alpha09 introduces the new settings plugin. The settings plugin lets you centralize global configurations—configurations that apply to all modules—in one place so you don't need to copy and paste the configurations in multiple modules. In addition, you can use the settings plugin to create tool execution profiles, or different instructions for how to run a tool, and switch among them.

To use the settings plugin, apply the plugin in the settings.gradle file:

apply plugin ''

Centralize global configurations

To configure global configurations, use the new android block in the settings.gradle file. Here's an example:

android {
  compileSdk 31
  minSdk 28

Tool execution profiles

The settings plugin also lets you create execution profiles for some tools. An execution profile determines how a tool is run; you can select different execution profiles depending on the environment. In an execution profile, you can set JVM arguments for a tool and configure it to run in a separate process. Currently, only the R8 tool is supported.

Create execution profiles and set the default execution profile in the settings.gradle file, as shown in the following example:

android {
  execution {
    profiles {
      high {
        r8 {
          jvmOptions += ["-Xms2048m", "-Xmx8192m", "-XX:+HeapDumpOnOutOfMemoryError"]
          runInSeparateProcess true
      low {
        r8 {
          jvmOptions += ["-Xms256m", "-Xmx2048m", "-XX:+HeapDumpOnOutOfMemoryError"]
          runInSeparateProcess true
      ci {
        r8.runInSeparateProcess false
    defaultProfile "low"

To override the default profile, select a different profile using the android.experimental.settings.executionProfile property in the file:


You can also set this property using the command line, which lets you set up different workflows. For example if you have a continuous integration workflow you can use the command line to change the execution profile without having to change the settings.gradle file:

./gradlew assembleRelease \

JDK 17 required to run AGP 8.0

When using Android Gradle Plugin 8.0 to build your app, JDK 17 is now required to run Gradle. Android Studio Flamingo bundles JDK 17 and configures Gradle to use it by default, which means that most Android Studio users don't need to make any configuration changes to their projects.

If you need to manually set the JDK version used by AGP inside of Android Studio, you need to use JDK 17 or higher.

When using AGP independent of Android Studio, upgrade the JDK version by setting the JAVA_HOME environment variable or the command-line option to your installation directory of JDK 17.