Gradle 2.14 Download

  1. Gradle 2.14 Download Minecraft
  2. Gradle 2.14 Download Minecraft
  3. Gradle 2.14 Download Torrent
  4. Gradle 2.14 Download Mod
The JCenter repository became read-only on March 31st, 2021. For more information, see JCenter service update.

How to detect whether a user is using USB tethering? How to disable remote wipe for Exchange 2010 ActiveSync? Android software for the system administrator on the move Apple - How to migrate WhatsApp messages data from Android to iPhone?

The Android Studio build system is based on Gradle, and the Android Gradle plugin adds several features that are specific to building 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.

First download the KEYS as well as the asc signature file for the relevant distribution. Make sure you get these files from the main distribution directory, rather than from a mirror. Then verify the signatures using. Gpg -import KEYS gpg -verify apache-log4j-2.14.1-bin.tar.gz.asc. Then sync gradle, and it will automatically download 2.14.1. If you're using the new 2.3 Android Studio, you HAVE to use gradle wrapper 3.3, as its the minimum supported gradle wrapper version. If so, then you'll have to download Android Studio 2.2, or fix whatever issue you have in your project that needs gradle wrapper version 2.14.1.

This page explains how to keep your Gradle tools up to date and what's in the recent updates.

For upcoming breaking changes in the Android Gradle plugin, see theAndroid 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 file. The plugin version applies to all modules built in that Android Studio project. The following example sets the plugin to version 7.0.0 from the build.gradle file:

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 eachversion of the Android Gradle plugin. For the best performance, you shoulduse the latest possible version of both Gradle and the plugin.

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

You can specify the Gradle version in either the File > Project Structure > Project menu in Android Studio, or by editing the Gradle distribution reference in the gradle/wrapper/ file. The following example sets the Gradle version to 7.0.0 in the file.

Versioning changes (November 2020)

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

Here are the notable changes:

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

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

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

  • APIs will be deprecated approximately one year in advance, withreplacement functionality made available concurrently. Deprecated APIswill be removed approximately one year later during the subsequent majorupdate.

7.0.0 (July 2021)

Android Gradle plugin 7.0.0 is a major release that includes a variety of newfeatures and improvements.

7.0.1 (August 2021)

This minor update includes various bug fixes. To see a list of notable bug fixes, read the related post on theRelease Updates blog.


Minimum versionDefault versionNotes
Gradle7. learn more, see updating Gradle.
SDK Build Tools30. or configure SDK Build Tools.
NDKN/A21.4.7075529Install or configure a different version of the NDK.
JDK1111To learn more, see setting the JDK version.

JDK 11 required to run AGP 7.0

When using Android Gradle plugin 7.0 to build your app, JDK 11 is now requiredto run Gradle. Android Studio Arctic Fox bundles JDK 11 and configures Gradleto use it by default, which means that most Android Studio users do not needto make any configuration changes to their projects.

If you need to manually set the JDK version used by AGP inside of AndroidStudio, you need to use JDK 11 or higher.

When using AGP independent of Android Studio, upgrade the JDK version bysetting the JAVA_HOME environment variable or the option to your installation directory of JDK 11.

Variant API stable

The new Variant API is now stable. See the new interfaces in the package, and examples in the gradle-recipes GitHub project. As part of the new Variant API,we have made available a number of intermediate files, called artifacts,through the Artifactsinterface. These artifacts, like the merged manifest, can be safely obtained andcustomized by using third-party plugins and code.

We will continue extending the Variant API by adding new functionalities andaugmenting the number of intermediate artifacts we make available for customization.

Behavior changes for Lint

This section describes multiple Lint behavior changes in Android Gradle plugin 7.0.0.

Improved lint for library dependencies

Running lint with checkDependencies = true is now faster than before.For Android projects consisting of an app with library dependencies, it isrecommended to set checkDependencies to true as shown below, and to run lint via./gradlew :app:lint, which will analyze all dependency modules in parallel andproduce a single report including issues from the app and all of its dependencies.

Lint tasks can now be UP-TO-DATE

If a module's sources and resources have not changed, the lint analysis task forthe module does not need to run again. When this happens, the execution of thetask appears as 'UP-TO-DATE' in the Gradle output. With this change, when runninglint on an application module with checkDependencies = true, only modules thathave changed will need to run their analysis. As a result, Lint can run even faster.

The Lint report task also does not need to run if its inputs have not changed.A related known issue is that there is no lint text output printed to stdoutwhen the lint task is UP-TO-DATE (issue #191897708).

Running lint on dynamic-feature modules

AGP no longer supports running lint from dynamic-feature modules. Running lintfrom the corresponding application module will run lint on its dynamic-featuremodules and include all issues in the app’s lint report. A related known issueis that when running lint with checkDependencies = true from an app module,dynamic-feature library dependencies aren’t checked unless they’re also appdependencies (issue #191977888).

Running lint on default variant only

Running ./gradlew :app:lint now runs lint for only the default variant.In previous versions of AGP, it would run lint for all variants.

Missing class warnings in R8 shrinker

R8 more precisely andconsistently handles missing classes and the -dontwarn option. Therefore, youshould start to evaluate the missing class warnings emitted by R8.

When R8 encounters a class reference that is not defined in your app or one ofits dependencies, it will emit a warning that appears in your build output.For example:

This warning means that the class definition java.lang.instrument.ClassFileTransformercould not be found when analyzing your app’s code. While this usually means there is an error,it’s possible that you may want to ignore this warning. Two common reasons to ignore the warning are:

  1. Libraries that are targeting the JVM and the missing class are of JVM library type (as in the example above).

  2. One of your dependencies uses a compile-time only API.

You can ignore a missing class warning by adding a -dontwarn rule to file. For example:

For convenience, AGP will generate a file that contains all potentially missingrules, writing them to a file path such as the following:app/build/outputs/mapping/release/missing_rules.txt. Add the rules to file to ignore warnings.

In AGP 7.0, missing class messages will appear as warnings, and you can turn theminto errors by setting android.r8.failOnMissingClasses = true in AGP 8.0, these warnings will become errors that break your build. It ispossible to keep the AGP 7.0 behavior by adding the option -ignorewarnings toyour file, but that is not recommended.

Android Gradle plugin build cache removed

The AGP build cache was removed in AGP 4.1. Previously introduced in AGP 2.3 tocomplement the Gradle build cache, the AGP build cache was superseded entirelyby the Gradle build cache in AGP 4.1. This change does not impact build time.

In AGP 7.0, the android.enableBuildCache property, android.buildCacheDir property,and the cleanBuildCache task have been removed.

Use Java 11 source code in your project

You can now compile up to Java 11 source code in your app’s project, enablingyou to use newer language features like private interface methods, the diamondoperator for anonymous classes, and local variable syntax for lambda parameters.

To enable this feature, set compileOptions to the desired Java version andset compileSdkVersion to 30 or above:

Dependency configurations removed

In AGP 7.0, the following configurations (or dependency scopes) have been removed:

  • compile
    Depending on use case, this has been replaced by apior implementation.
    Also applies to *Compile variants, for example: debugCompile.
  • provided
    This has been replaced by compileOnly.
    Also applies to *Provided variants, for example: releaseProvided.
  • apk
    This has been replaced by runtimeOnly.
  • publish
    This has been replaced by runtimeOnly.

In most cases, the AGP Upgrade Assistant willautomatically migrate your project to the new configurations.

Classpath change when compiling against Android Gradle plugin

If you are compiling against the Android Gradle plugin, your compile classpathmay change. Because AGP now uses api/implementation configurations internally,some artifacts may be removed from your compile classpath. If you depend on anAGP dependency at compile-time, be sure to add it as an explicit dependency.

Addition of native libraries in a Java resources folder is not supported

Previously, you could add a native library in a Java resources folder, andregister the folder using android.sourceSets.main.resources.srcDirsso thatthe native library would be extracted and added to the final APK. Starting withAGP 7.0, this is not supported and native libraries in a Java resourcesfolder are ignored. Instead, use the DSL method intended for nativelibraries, android.sourceSets.main.jniLibs.srcDirs. For more information, seehow to configure source sets.

Known issues

This section describes known issues that exist in Android Gradle plugin 7.0.0.

Incompatibility with 1.4.x Kotlin Multiplatform plugin

Android Gradle Plugin 7.0.0 is compatible with Kotlin Multiplatform plugin1.5.0 and higher. Projects that use the Kotlin Multiplatform support need toupdate to Kotlin 1.5.0 to use Android Gradle Plugin 7.0.0. As a workaround, youcan downgrade the Android Gradle plugin to 4.2.x, although this is not recommended.

For more information, see KT-43944.

Missing lint output

There is no lint text output printed to stdout when the lint task is up-to-date(issue #191897708). For more context,see Behavior changes for lint. This issue will be fixedin Android Gradle plugin 7.1.

Not all dynamic-feature library dependencies are lint checked

When running lint with checkDependencies = true from an app module,dynamic-feature library dependencies aren’t checked unless they’re also appdependencies (issue #191977888).As a workaround, the lint task can be run on those libraries. For more context,see Behavior changes for lint.

4.2.0 (March 2021)


Minimum version Default version Notes
Gradle6.7.1N/A To learn more, see updating Gradle.
SDK Build Tools30. or configure SDK Build Tools.
NDKN/A 21.4.7075529 Install or configure a different version of the NDK.

New features

This version of the Android Gradle plugin includes the following new features.

Java language version 8 by default

Starting in version 4.2, AGP will use the Java 8 language level by default.Java 8 provides access to a number of newer language features including lambdaexpressions, method references, and static interface methods. For the full listof supported features see the Java 8 documentation.

To keep the old behavior, specify Java 7 explicitly in your module-levelbuild.gradle.kts or build.gradle file:

New JVM resource compiler

A new JVM resource compiler in Android Gradle plugin 4.2 tool replaces portionsof the AAPT2 resource compiler, potentiallyimproving build performance, especially on Windows machines. The new JVMresource compiler is enabled by default.

v3 and v4 signing now supported

Android Gradle Plugin 4.2 now supports APK v3and APK v4 signing formats.To enable one or both of these formats in yourbuild, add the following properties to your module-level build.gradleor build.gradle.kts file:

APK v4 signing allows you to quickly deploy large APKs using the ADBIncremental APK installation inAndroid 11. This new flag takes care of the APK signing step in the deploymentprocess.

Configure app signing per variant

It is now possible to enable or disable app signing in Android Gradleplugin per variant.

This example demonstrates how to set app signing per variant using theonVariants()method in either Kotlin or Groovy:

New Gradle property: android.native.buildOutput

To reduce clutter in build output, AGP 4.2 filters messagesfrom native builds that use CMake and ndk-build,displaying only C/C++ compiler output by default. Previously, a line of outputwas generated for every file that was built, resulting in a large quantity ofinformational messages.

If you would like to see the entirety of the native output, set the newGradle property android.native.buildOutput to verbose.

You can set this property in either the file or through thecommand line.

Command line

The default value of this property is quiet.

Behavior change for files

Starting in AGP 4.2, it is no longer possible to override Gradle propertiesfrom subprojects. In other words, if you declare a property in file in a subproject instead of the root project, it willbe ignored.

As an example, in previous releases, AGP would read values fromprojectDir/,projectDir/app/,projectDir/library/, etc. For appmodules, if the same Gradle property was present in bothprojectDir/ andprojectDir/app/, the value fromprojectDir/app/ would take precedence.

In AGP 4.2, this behavior has been changed, and AGP won't load values in subprojects (e.g.,projectDir/app/ This changereflects the new Gradle behavior and supports configuration caching.

For more information on setting values in files, see theGradle docs.

Gradle compatibility and configuration changes

When running in Android Studio, the Gradle build tool uses Studio's bundled JDK.In previous releases, JDK 8 was bundled with Studio. In 4.2,however, JDK 11 is now bundled instead. When using the new bundled JDK to runGradle, this may result in some incompatibility or impact JVM performancedue to changes to the garbage collector. These issues are described below.

Note: Although we recommend running Gradle with JDK 11, it is possible to change the JDK used to run Gradle in the Project Structuredialog. Changing this setting will only change the JDK used to run Gradle, andwill not change the JDK used to run Studio itself.

Studio compatibility with Android Gradle plugin (AGP)

Android Studio 4.2 can open projects that use AGP 3.1 andhigher provided that AGP is running Gradle 4.8.1 and higher. For moreinformation about Gradle compatibility, see Update Gradle.

Optimizing Gradle builds for JDK 11

This update to JDK 11 impacts the default configuration of the JVM garbagecollector, since JDK 8 uses the parallel garbage collector while JDK 11 usesthe G1 garbage collector.

To potentially improve build performance, we recommendtesting your Gradle builds with theparallel garbage collector. In set the following:

If there are other options already set in this field, add a new option:

To measure build speed with different configurations, see Profile your build.

DEX files uncompressed in APKs when minSdk = 28 or higher

AGP now packages DEX files uncompressed in APKs by default when minSdk = 28 orhigher. This causes an increase in APK size, but it results in a smallerinstallation size on the device, and the download size is roughly the same.

To force AGP to instead package the DEX files compressed, you can add thefollowing to your build.gradle file:

4.1.0 (August 2020)


Minimum version Default version Notes
Gradle6.5N/A To learn more, see updating Gradle.
SDK Build Tools29. or configure SDK Build Tools.
NDKN/A 21.1.6352462 Install or configure a different version of the NDK.

New features

This version of the Android Gradle plugin includes the following new features.

Kotlin Script DSL support

To help improve the editing experience for Kotlin buildscript users, the DSLand APIs of Android Gradle plugin 4.1 are now defined in a set of Kotlininterfaces separately from their implementation classes. This means that:

  • Nullability and mutability are now explicitly declared on Kotlin types.
  • Documentation generated from those interfaces is published in theKotlin API Reference.
  • The API surface of the Android Gradle Plugin is clearly defined, to makeextending Android builds less brittle in the future.
Important: If you have already adopted KTS build scripts or use Kotlin inbuildSrc, this may cause source compatibility breakages for certain errorsthat would have manifest as run-time errors in previous releases.

Collection types that are designed to be mutated in the DSL are now uniformlydefined as:

val collection: MutableCollectionType

This means that it is no longer possible to write the following in Kotlin scripts for some collections that previously supported it:

collection = collectionTypeOf(...)

However, mutating the collection is supported uniformly so collection += …and collection.add(...) should now work everywhere.

If you discover any issues when upgrading a project that uses Android Gradleplugin Kotlin APIs and DSL, please report a bug.

Export C/C++ dependencies from AARs

Android Gradle plugin 4.0 added the ability to import Prefab packages in AARdependencies. In AGP 4.1,it's now possible to export libraries from your external native build in anAAR for an Android Library project.

Gradle 2.14 download pc

To export your native libraries, add the following to the android block ofyour library project's build.gradle file:

In this example, the mylibrary and myotherlibrary libraries from either yourndk-build or CMake external native build will be packaged in the AAR produced byyour build, and each will export the headers from the specified directory totheir dependents.

Note: For users of Android Gradle plugin 4.0 and above, the configurationsettings for importing prebuilt native libraries have changed. For moreinformation, see the 4.0 release notes.

R8 support for Kotlin metadata

Kotlin uses custom metadata in Java class files to identify Kotlin languageconstructs. R8 now has support for maintaining and rewriting Kotlinmetadata to fully support shrinking of Kotlin libraries and applicationsusing kotlin-reflect.

To keep Kotlin metadata, add the following keep rules:

This will instruct R8 to keep Kotlin metadata for all classes that aredirectly kept.

For more information, see Shrinking Kotlin libraries and applications using Kotlin reflection with R8 on Medium.

Assertions in debug builds

When you build the debug version of your app using Android Gradleplugin 4.1.0 and higher, the built-in compiler (D8) will rewrite your app's codeto enable assertions at compile time, so you always have assertion checksactive.

Behavior changes

Android Gradle plugin build cache removed

The AGP build cache was removed in AGP 4.1. Previouslyintroduced in AGP 2.3 to complement the Gradle build cache, the AGP build cachewas superseded entirely by the Gradle build cache in AGP 4.1. This change doesnot impact build time.

The cleanBuildCache task and the android.enableBuildCache andandroid.buildCacheDir properties are deprecated and will be removed inAGP 7.0. The android.enableBuildCache property currently has no effect,while the android.buildCacheDir property and the cleanBuildCache taskwill be functional until AGP 7.0 for deleting any existing AGP build cachecontents.

App size significantly reduced for apps using code shrinking

Starting with this release, fields from R classes areno longer kept by default, whichmay result in significant APK size savings for apps that enable codeshrinking. This should not result in a behavior change unless youare accessing R classes by reflection, in which case it is necessary toadd keep rules for those R classes.

android.namespacedRClass property renamed to android.nonTransitiveRClass

The experimental flag android.namespacedRClass has been renamed toandroid.nonTransitiveRClass.

Set in the file, this flag enables namespacing of eachlibrary's R class so that its R class includes only theresources declared in the library itself and none from the library'sdependencies, thereby reducing the size of the R class for that library.

Kotlin DSL: coreLibraryDesugaringEnabled renamed

The Kotlin DSL compile option coreLibraryDesugaringEnabled has beenchanged to isCoreLibraryDesugaringEnabled.

Version properties removed from BuildConfig class in library projects

For library projects only, the BuildConfig.VERSION_NAME andBuildConfig.VERSION_CODE properties have been removed from the generatedBuildConfig class because these static values did not reflect the finalvalues of the application’s version code and name, and were thereforemisleading. Additionally, these values were discarded during manifest merging.

In a future version of Android Gradle plugin, the versionName andversionCode properties will also be removed from the DSL for libraries.Currently, there is no way to automatically access the app version code/namefrom a library sub-project.

For application modules, there is no change, you can still assign values toversionCode and versionName in the DSL; these values will propagate to theapp’s manifest and BuildConfig fields.

Set the NDK path

You can set the path to your local NDK installation using the android.ndkPathproperty in your module's build.gradle file.

If you use this property together with theandroid.ndkVersion property,then this path must contain an NDK version that matches android.ndkVersion.

Library unit test behavior changes

We've changed the behavior of how library unit tests are compiled and run. Alibrary's unit tests are now compiled and run against compile/runtime classesof the library itself, resulting in the unit test consuming the library in thesame way external subprojects do. This configuration typically results inbetter testing.

In some cases library unit tests that use data binding may encounter missing DataBindingComponentor BRclasses. Those tests need to be ported to an instrumented test in theandroidTest project, since compiling and running against those classes ina unit test may produce incorrect output.

io.fabric Gradle plugin deprecated

The io.fabric Gradle plugin is deprecated and is not compatible withversion 4.1 of the Android Gradle plugin. For more information on thedeprecated Fabric SDK and migrating to the Firebase Crashlytics SDK, seeUpgrade to the Firebase Crashlytics SDK.

4.0.0 (April 2020)

This version of the Android plugin requires the following:

  • Gradle 6.1.1.To learn more, read the section about updating Gradle.

  • SDK Build Tools 29.0.2 or higher.

4.0.1 (July 2020)

This minor update supports compatibility with new default settings and features for package visibility in Android 11.

In previous versions of Android, it was possible to view a list of all apps installed on a device. Starting with Android 11 (API level 30), by default apps have access to only a filtered list of installed packages. To see a broader list of apps on the system, you now need to add a <queries> element in your app or library’s Android manifest.

Android Gradle plugin 4.1+ is already compatible with the new <queries> declaration; however, older versions are not compatible. If you add the <queries> element or if you start relying on a library or SDK that supports targeting Android 11, you may encounter manifest merging errors when building your app.

To address this issue, we’re releasing a set of patches for AGP 3.3 and higher. If you’re using an older version of AGP, upgrade to one of the following versions:

If you are using
AGP version...
...upgrade to:
4.0.* 4.0.1
3.6.* 3.6.4
3.5.* 3.5.4
3.4.* 3.4.3
3.3.* 3.3.3

For more information on this new feature, see Package visibility in Android 11.

New features

This version of the Android Gradle plugin includes the following new features.

Support for Android Studio Build Analyzer

The Build Analyzer window helps you understand and diagnose issues with yourbuild process, such as disabled optimizations and improperly configured tasks.This feature is available when you use Android Studio 4.0 and higher withAndroid Gradle plugin 4.0.0 and higher. You can open the Build Analyzerwindow from Android Studio as follows:

  1. If you haven't already done so, build your app by selecting Build > MakeProject from the menu bar.
  2. Select View > Tool Windows > Build from the menu bar.
  3. In the Build window, open the Build Analyzer window in one of thefollowing ways:
    • After Android Studio finishes building your project, click the BuildAnalyzer tab.
    • After Android Studio finishes building your project, click the link onthe right side of the Build Output window.

The Build Analyzer window organizes possible build issues in a tree on theleft. You can inspect and click on each issue to investigate its details in thepanel on the right. When Android Studio analyzes your build, it computes the setof tasks that determined the build's duration and provides a visualization tohelp you understand the impact of each of these tasks. You can also get detailson warnings by expanding the Warnings node.

To learn more, read identify build speed regressions.

Java 8 library desugaring in D8 and R8

The Android Gradle plugin now includes support for using a number of Java 8language APIs without requiring a minimum API level for your app.

Through a process called desugaring, the DEX compiler, D8, in Android Studio3.0 and higher already provided substantial support for Java 8 language features(such as lambda expressions, default interface methods, try with resources, andmore). In Android Studio 4.0, the desugaring engine has been extended to be ableto desugar Java language APIs. This means that you can now include standardlanguage APIs that were available only in recent Android releases (such asjava.util.streams) in apps that support older versions of Android.

The following set of APIs is supported in this release:

  • Sequential streams (
  • A subset of java.time
  • java.util.function
  • Recent additions to java.util.{Map,Collection,Comparator}
  • Optionals (java.util.Optional, java.util.OptionalInt andjava.util.OptionalDouble) and some other new classes useful with the aboveAPIs
  • Some additions to java.util.concurrent.atomic (new methods onAtomicInteger, AtomicLong and AtomicReference)
  • ConcurrentHashMap (with bug fixes for Android 5.0)

To support these language APIs, D8 compiles a separate library DEX file thatcontains an implementation of the missing APIs and includes it in your app. Thedesugaring process rewrites your app's code to instead use this library atruntime.

To enable support for these language APIs, include the following in your appmodule's build.gradle file:

Note that you may also need to include the above code snippet in a librarymodule's build.gradle file if:

  • The library module's instrumented tests use these language APIs (eitherdirectly or through the library module or its dependencies). This is so thatthe missing APIs are provided for your instrumented test APK.

  • You want to run lint on the library module in isolation. This is to helplint recognize valid usages of the language APIs and avoid reporting falsewarnings.

New options to enable or disable build features

Android Gradle plugin 4.0.0 introduces a new way to control which build featuresyou want to enable and disable, such as View Binding and Data Binding. When new features are added, they will be disabled, by default. You canthen use the buildFeatures block to enable only the features you want, and ithelps you optimize the build performance for your project. You can set theoptions for each module in the module-level build.gradle file, as follows:

You can also specify the default setting for these features across all modulesin a project by including one or more of the following in your project’ file, as shown below. Keep in mind, you can still use thebuildFeatures block in the module-level build.gradle file to override theseproject-wide default settings.

Feature-on-feature dependencies

In previous versions of the Android Gradle plugin, all feature modulescould depend only on the app's base module. When using Android Gradle plugin4.0.0, you can now include a feature module that depends on another featuremodule. That is, a :video feature can depend on the :camera feature, whichdepends on the base module, as shown in the figure below.

Feature module :video depends on feature :camera, which depends on the base :app module.

This means that when your app requests to download a feature module, theapp also downloads other feature modules it depends on. After you createfeature modulesfor your app, you can declare a feature-on-feature dependency in the module’sbuild.gradle file. For example, the :video module declares a dependency on:camera as follows:

Additionally, you should enable the feature-on-feature dependency feature inAndroid Studio (to support the feature when editing the Run configuration, forexample) by clicking Help > Edit Custom VM Options from the menu bar andincluding the following:

Dependencies metadata

When building your app using Android Gradle plugin 4.0.0 and higher, the pluginincludes metadata that describes the dependencies that are compiled into yourapp. When uploading your app, the Play Console inspects this metadata to provideyou with the following benefits:

  • Get alerts for known issues with SDKs and dependencies your app uses
  • Receive actionable feedback to resolve those issues

The data is compressed, encrypted by a Google Play signing key, and stored inthe signing block of your release app. However, you can inspect the metadatayourself in the local intermediate build files in the following directory:<project>/<module>/build/outputs/sdk-dependencies/release/sdkDependency.txt.

If you’d rather not share this information, you can opt-out by including thefollowing in your module’s build.gradle file:

Import native libraries from AAR dependencies

You can now import C/C++ librariesfrom your app's AAR dependencies. When you follow the configuration stepsdescribed below, Gradle automatically makes these native libraries available touse with your external native build system, such as CMake. Note that Gradle onlymakes these libraries available to your build; you must still configure yourbuild scripts to use them.

Libraries are exported using the Prefab package format.

Each dependency can expose at most one Prefab package, which comprises one ormore modules. A Prefab module is a single library, which could be either ashared, static, or header-only library.

Typically, the package name matches the Maven artifact name and the module namematches the library name, but this is not always true. Because you need to knowthe package and module name of the libraries, you might need to consult thedependency's documentation to determine what those names are.

Configure your external native build system

To see the steps you need to follow, click on the external native build systemyou plan to use.

Native dependencies included in an AAR are exposed to your CMake project via theCMAKE_FIND_ROOT_PATH variable. This value will be set automatically by Gradle whenCMake is invoked, so if your build system modifies this variable, be sure to appendrather than assign to it.

Each dependency exposes a config-file package to your CMake build, which youimport with the find_package command. This command searches for config-filepackages that match the given package name and version and exposes the targets itdefines to be used in your build. For example, if your application and it uses curl, you should include the following in yourCMakeLists.txt file:

You can now specify #include 'curl/curl.h' in app.cpp. When you build yourproject, your external native build system automatically links libapp.soagainst and packages in the APK or app bundle. Foradditional information, refer to the curl prefab sample.

Behavior changes

When using this version of the plugin, you might encounter the following changesin behavior.

v1/v2 signing configuration updates

The behavior for app signing configurations in the signingConfig block haschanged to the following:

v1 signing
  • If v1SigningEnabled is explicitly enabled, AGP performs v1 app signing.
  • If v1SigningEnabled is explicitly disabled by the user, v1 app signing isnot performed.
  • If the user has not explicitly enabled v1 signing, it can be automaticallydisabled based on minSdk and targetSdk.
v2 signing
  • If v2SigningEnabled is explicitly enabled, AGP performs v2 app signing.
  • If v2SigningEnabled is explicitly disabled by the user, v2 app signing isnot performed.
  • If the user has not explicitly enabled v2 signing, it can be automaticallydisabled based on targetSdk.

These changes allow AGP to optimize builds by disabling the signing mechanismbased on whether the user has explicitly enabled these flags. Prior to thisrelease, it was possible for v1Signing to be disabled even when explicitlyenabled, which could be confusing.

feature and instantapp Android Gradle plugins removed

Android Gradle plugin 3.6.0 deprecated the Feature plugin( and the Instant App plugin ( infavor of using the Dynamic Feature plugin ( tobuild and package your instant apps using Android AppBundles.

In Android Gradle plugin 4.0.0 and higher, these deprecated plugins arefully removed. So, to use the latest Android Gradle plugin, you need to migrateyour instant app to support Android AppBundles.By migrating your instant apps, you can leverage the benefits of appbundles and simplify your app's modulardesign.

Note: To open projects that use the removed plugins in Android Studio 4.0 andhigher, the project must use Android Gradle plugin 3.6.0 or lower.

Separate annotation processing feature removed

The ability to separate annotation processing into a dedicated task has beenremoved. This option was used to maintainincremental Java compilation when non-incremental annotation processors areused in Java-only projects; it was enabled by settingandroid.enableSeparateAnnotationProcessing to true in file, which no longer works.

Instead, you should migrate to using incremental annotationprocessors to improvebuild performance.

includeCompileClasspath is deprecated

The Android Gradle plugin no longer checks for or includes annotation processorsyou declare on the compile classpath, and theannotationProcessorOptions.includeCompileClasspath DSL property no longer hasany effect. If you include annotation processors on the compile classpath, youmight get the following error:

To resolve this issue, you must include annotation processors in yourbuild.gradle files using the annotationProcessor dependency configuration.To learn more, read Add annotationprocessors.

Automatic packaging of prebuilt dependencies used by CMake

Prior versions of the Android Gradle Plugin required that you explicitly packageany prebuilt libraries used by your CMake external native build by usingjniLibs. You may have libraries in the src/main/jniLibs directory of yourmodule, or possibly in some other directory configured in your build.gradlefile:

With Android Gradle Plugin 4.0, the above configuration is no longer necessaryand will result in a build failure:

External native build now automatically packages thoselibraries, so explicitly packaging the library with jniLibs results in aduplicate. To avoid the build error, move the prebuilt library to a locationoutside jniLibs or remove the jniLibs configuration from your build.gradlefile.

Known issues

This section describes known issues that exist in Android Gradle plugin 4.0.0.

Race condition in Gradle worker mechanism

Changes in Android Gradle plugin 4.0 can trigger a race condition in Gradlewhen running with --no-daemon and versions of Gradle 6.3 or lower, causingbuilds to hang after the build is finished.

This issue will be fixed in Gradle 6.4.

3.6.0 (February 2020)

This version of the Android plugin requires the following:

  • Gradle 5.6.4.To learn more, read the section about updating Gradle.

  • SDK Build Tools 28.0.3 or higher.

3.6.4 (July 2020)


This minor update supports compatibility with new default settings and features for package visibility in Android 11.

See the 4.0.1 release notes for details.

New features

This version of the Android Gradle plugin includes the following new features.

View Binding

View binding provides compile-time safety when referencing views in your code.You can now replace findViewById() with the auto-generated binding classreference. To start using View binding, include the following in each module'sbuild.gradle file:

To learn more, read the View Bindingdocumentation.

Support for the Maven Publish plugin

The Android Gradle plugin includes support for theMaven Publish Gradle plugin,which allows you to publish build artifacts to an Apache Maven repository. TheAndroid Gradle plugin creates acomponentfor each build variant artifact in your app or library module that you can useto customize apublicationto a Maven repository.

To learn more, go to the page about how to use the Maven Publishplugin.

New default packaging tool

When building the debug version of your app, the plugin uses a newpackaging tool, called zipflinger, to build your APK. This new tool shouldprovide build speed improvements. If the new packaging tool doesn't work as youexpect, please report a bug. You can revert to using theold packaging tool by including the following in your file:

Native build attribution

You can now determine the length of time it takes Clang to build and link eachC/C++ file in your project. Gradle can output a Chrome trace that containstimestamps for these compiler events so you can better understand the timerequired to build your project. To output this build attribution file, do thefollowing:

  1. Add the flag -Pandroid.enableProfileJson=true when running a Gradlebuild. For example:

    gradlew assembleDebug -Pandroid.enableProfileJson=true

  2. Open the Chrome browser and type chrome://tracing in the search bar.

  3. Click the Load button and navigate to project-root/build/android-profileto find the file. The file is named profile-timestamp.json.gz.

You can see the native build attribution data near the top of the viewer:

Behavior changes

When using this version of the plugin, you might encounter the following changesin behavior.

Native libraries packaged uncompressed by default

When you build your app, the plugin now sets extractNativeLibs to 'false' bydefault. That is, your native libraries are page aligned and packageduncompressed. While this results in a larger upload size, your usersbenefit from the following:

  • Smaller app install size because the platform can access the native librariesdirectly from the installed APK, without creating a copy of the libraries.
  • Smaller download size because Play Store compression is typically better whenyou include uncompressed native libraries in your APK or Android App Bundle.

If you want the Android Gradle plugin to instead package compressed nativelibraries, include the following in your app's manifest:

Default NDK version

If you download multiple versions of the NDK, the Android Gradle plugin nowselects a default version to use in compiling your source code files. Previously,the plugin selected the latest downloaded version of the NDK. Use theandroid.ndkVersion property in the module's build.gradle file to overridethe plugin-selected default.

Simplified R class generation

The Android Gradle plugin simplifies the compile classpath by generating onlyone R class for each library module in your project and sharing those R classeswith other module dependencies. This optimization should result in fasterbuilds, but it requires that you keep the following in mind:

  • Because the compiler shares R classes with upstream module dependencies, it’simportant that each module in your project uses a unique package name.
  • The visibility of a library's R class to other project dependencies isdetermined by the configuration used to include the library as a dependency.For example, if Library A includes Library B as an 'api' dependency, LibraryA and other libraries that depend on Library A have access to Library B's Rclass. However, other libraries might not have access to Library B's R classIf Library A uses the implementation dependency configuration. To learnmore, read about dependencyconfigurations.

Remove resources missing from default configuration

For Library modules, if you include a resource for a language that you do notinclude in the default set of resources—for example, if you includehello_world as a string resource in /values-es/strings.xml but you don’tdefine that resource in /values/strings.xml—the Android Gradle plugin nolonger includes that resource when compiling your project. This behavior changeshould result in fewer Resource Not Found runtime exceptions and improvedbuild speed.

D8 now respects CLASS retention policy for annotations

When compiling your app, D8 now respects when annotations apply a CLASSretention policy, and those annotations are no longer available at runtime. Thisbehavior also exists when setting the app’s target SDK to API level 23, whichpreviously allowed access to these annotations during runtime when compilingyour app using older versions of the Android Gradle plugin and D8.

Other behavior changes

  • aaptOptions.noCompress is no longer case sensitive on all platforms (forboth APK and bundles) and respects paths that use uppercase characters.
  • Data binding is now incremental by default. To learn more, seeissue #110061530.
  • All unit tests, including Roboelectric unit tests, are now fullycacheable. To learn more, seeissue #115873047.

Bug fixes

This version of the Android Gradle plugin includes the following bug fixes:

  • Robolectric unit tests are now supported in library modules that use databinding. To learn more, seeissue #126775542.
  • You can now run connectedAndroidTest tasks across multiple modules whileGradle's parallel executionmode is enabled.

Known issues

This section describes known issues that exist in Android Gradle plugin 3.6.0.

Slow performance of Android Lint task

Android Lint can take much longer to complete on some projects due to aregression in its parsing infrastructure, resulting in slower computation ofinferred types for lambdas in certain code constructs.

The issue is reported as a bug in IDEAand will be fixed in Android Gradle Plugin 4.0.

Missing Manifest class

If your app defines custom permissions in its manifest, the Android Gradleplugin typically generates a class that includes your custompermissions as string constants. The plugin packages this class with your app,so you can more easily reference those permissions at runtime.

Generating the manifest class is broken in Android Gradle plugin 3.6.0. If youbuild your app with this version of the plugin, and it references the manifestclass, you might see a ClassNotFoundException exception. To resolve thisissue, do one of the following:

  • Reference your custom permissions by their fully-qualified name. For example,'com.example.myapp.permission.DEADLY_ACTIVITY'.
  • Define your own constants, as shown below:

3.5.0 (August 2019)

Android Gradle plugin 3.5.0, along with Android Studio3.5, is a major release and a result of Project Marble,which is a focus on improving three main areas of the Android developer tools:system health, feature polish, and fixing bugs. Notably, improving projectbuild speedwas a main focus for this update.

For information about these and other Project Marble updates, read the AndroidDevelopers blog postor the sections below.

This version of the Android plugin requires the following:

  • Gradle 5.4.1.To learn more, read the section about updating Gradle.

  • SDK Build Tools 28.0.3 or higher.

3.5.4 (July 2020)

This minor update supports compatibility with new default settings and features for package visibility in Android 11.

See the 4.0.1 release notes for details.

3.5.3 (December 2019)

This minor update supports Android Studio 3.5.3 and includes various bug fixes and performance improvements.

3.5.2 (November 2019)

This minor update supports Android Studio 3.5.2 and includes various bug fixes and performance improvements. To see a list of noteable bug fixes, read the related post on theRelease Updates blog.

3.5.1 (October 2019)

This minor update supports Android Studio 3.5.1 and includes various bug fixes and performance improvements. To see a list of noteable bug fixes, read the related post on theRelease Updates blog.

Incremental annotation processing

The Data Binding annotationprocessor supports incremental annotationprocessingif you set android.databinding.incremental=truein your file. This optimization results in improvedincremental build performance. For a full list of optimized annotationprocessors, refer to the table of incremental annotationprocessors.

Additionally, KAPT 1.3.30 and higher also support incremental annotationprocessors, which you can enable by including kapt.incremental.apt=true inyour file.

Cacheable unit tests

When you enable unit tests to use Android resources, assets, and manifests bysetting includeAndroidResourcesto true, the Android Gradle plugin generates a test config filecontaining absolute paths, which breaks cache relocatability. You can instructthe plugin to instead generate the test config using relative paths, whichallows the AndroidUnitTest task to be fully cacheable, by including thefollowing in your file:

Known issues

  • When using Kotlin Gradle plugin 1.3.31 or earlier, you might see the followingwarning when building or syncing your project:

    To resolve this issue,upgrade the plugin to version 1.3.40 or higher.

3.4.0 (April 2019)

This version of the Android plugin requires the following:

  • Gradle 5.1.1 or higher.To learn more, read the section about updating Gradle.

    Note: When using Gradle 5.0 and higher, the default Gradle daemon memory heapsizedecreases from 1 GB to 512 MB. This might result in a build performanceregression. To override this default setting, specify the Gradle daemon heapsizein your project's file.
  • SDK Build Tools 28.0.3 or higher.

3.4.3 (July 2020)

This minor update supports compatibility with new default settings and features for package visibility in Android 11.

See the 4.0.1 release notes for details.

3.4.2 (July 2019)

This minor update supports Android Studio 3.4.2 and includes various bug fixes and performance improvements. To see a list of noteable bug fixes, read the related post on theRelease Updates blog.

3.4.1 (May 2019)

This minor update supports Android Studio 3.4.1 and includes various bug fixes and performance improvements. To see a list of noteable bug fixes, read the related post on theRelease Updates blog.

New features

  • New lint check dependency configurations: The behavior of lintChecks haschanged and a new dependency configuration, lintPublish, has been introducedto give you more control over which lint checks are packaged in your Androidlibraries.

    • lintChecks: This is an existing configuration that you should use forlint checks you want to only run when building your project locally. If youwere previously using the lintChecks dependency configuration to includelint checks in the published AAR, you need to migrate those dependencies toinstead use the new lintPublish configuration described below.
    • lintPublish: Use this new configuration in library projects for lint checksyou want to include in the published AAR, as shown below. This means thatprojects that consume your library also apply those lint checks.

    The following code sample uses both dependency configurations in a localAndroid library project.

  • In general, packaging and signing tasks should see an overall build speedimprovement. If you notice a performance regression related to these tasks,please report a bug.

Behavior changes

  • Android Instant Apps Feature plugin deprecation warning: If you’re stillusing the plugin to build your instant app, AndroidGradle plugin 3.4.0 will give throw you a deprecation warning. To make sureyou can still build you instant app on future versions of the plugin, migrateyour instant app to usingthe dynamic feature plugin, which alsoallows you to publish both your installed and instant app experiences from asingle Android App Bundle.

  • R8 enabled by default: R8 integrates desugaring, shrinking, obfuscating,optimizing, and dexing all in one step—resulting innoticeable build performance improvements.R8 was introduced in Android Gradle plugin 3.3.0 andis now enabled by default for both app and Android library projects usingplugin 3.4.0 and higher.

    The image below provides a high-level overview of the compile processbefore R8 was introduced.

    Now, with R8, desugaring, shrinking, obfuscating, optimizing, and dexing (D8)are all completed in one step, as illustrated below.

    Keep in mind, R8 is designed to work with your existing ProGuard rules, soyou’ll likely not need to take any actions to benefit from R8. However,because it’s a different technology to ProGuard that’s designed specificallyfor Android projects, shrinking and optimization may result in removing codethat ProGuard may have not. So, in this unlikely situation, you might need toadd additional rules to keep that code in your build output.

    If you experience issues using R8, read theR8 compatibility FAQto check if there’s a solution to your issue. If a solution isn’t documented,please report a bug.You can disable R8 by adding one of the following lines to your project’ file:

    Note: For a given build type, if you set useProguard to false in your appmodule's build.gradle file, the Android Gradle plugin uses R8 to shrink yourapp's code for that build type, regardless of whether you disable R8 in yourproject's file.
  • ndkCompile is deprecated: You now get a build error if you try to usendkBuild to compile your native libraries. You should instead use eitherCMake or ndk-build toAdd C and C++ code to your project.

Known issues

  • The correct usage of unique package names are currently not enforced but willbecome more strict on later versions of the plugin. On Android Gradle pluginversion 3.4.0, you can opt-in to check whether your project declaresacceptable package names by adding the line below to your gradle.propertiesfile.

    To learn more about setting a package name through the Android Gradleplugin, see Set the application ID.

3.3.0 (January 2019)

Gradle 2.14 Download Minecraft

This version of the Android plugin requires the following:

  • Gradle 4.10.1 or higher.To learn more, read the section about updating Gradle.

    Note: When using Gradle 5.0 and higher, the default Gradle daemon memory heapsizedecreases from 1 GB to 512 MB. This might result in a build performanceregression. To override this default setting, specify the Gradle daemon heapsizein your project's file.
  • SDK Build Tools 28.0.3 or higher.

3.3.3 (July 2020)

This minor update supports compatibility with new default settings and features for package visibility in Android 11.

See the 4.0.1 release notes for details.

3.3.2 (March 2019)

This minor update supports Android Studio 3.3.2 and includes various bug fixes and performance improvements. To see a list of noteable bug fixes, read the related post on theRelease Updates blog.

3.3.1 (February 2019)

This minor update supports Android Studio 3.3.1 and includes various bug fixes and performance improvements.

New features

  • Improved classpath synchronization: When resolving dependencies on yourruntime and compile time classpaths, the Android Gradle plugin attempts to fixcertain downstream version conflicts for dependencies that appear acrossmultiple classpaths.

    For example, if the runtime classpath includes Library A version 2.0 and thecompile classpath includes Library A version 1.0, the plugin automaticallyupdates the dependency on the compile classpath to Library A version 2.0 toavoid errors.

    However, if the runtime classpath includes Library A version 1.0 and thecompile includes Library A version 2.0, the plugin does not downgrade thedependency on the compile classpath to Library A version 1.0, and you will getan error. To learn more, seeFix conflicts between classpaths.

  • Improved incremental Java compilation when using annotation processors:This update decreases build time by improving support for incremental Javacompilation when using annotation processors.

    Note: This feature is compatible with Gradle 4.10.1 and higher, except Gradle5.1 due to Gradle issue 8194.
    • For projects using Kapt (most Kotlin-only projects and Kotlin-Javahybrid projects): Incremental Java compilation is enabled, even when youuse data binding or the retro-lambda plugin. Annotation processing by theKapt task is not yet incremental.
    • For projects not using Kapt (Java-only projects): If the annotationprocessors you use all supportincremental annotation processing,incremental Java compilation is enabled by default. To monitor incrementalannotation processor adoption, watchGradle issue 5277.

      If, however, one or more annotation processors do not support incrementalbuilds, incremental Java compilation is not enabled. Instead, you caninclude the following flag in your file:

      When you include this flag, the Android Gradle plugin executes theannotation processors in a separate task and allows the Java compilationtask to run incrementally.

  • Better debug info when using obsolete API: When the plugin detects thatyou're using an API that's no longer supported, it can now providemore-detailed information to help you determine where that API is being used.To see the additional info, you need to include the following in yourproject's file:

    You can also enable the flag by passing -Pandroid.debug.obsoleteApi=truefrom the command line.

  • You can run instrumentation tests on feature modules from the commandline.

Behavior changes

  • Lazy task configuration: The plugin now usesGradle’s new task creation APIto avoid initializing and configuring tasks that are not required to completethe current build (or tasks not on the execution task graph). For example, ifyou have multiple build variants, such as “release” and “debug” buildvariants, and you're building the “debug” version of your app, the pluginavoids initializing and configuring tasks for the “release” version of yourapp.

    Calling certain older methods in the Variants API, such asvariant.getJavaCompile(), might still force task configuration. To make surethat your build is optimized for lazy task configuration, invoke new methodsthat instead return aTaskProviderobject, such as variant.getJavaCompileProvider().

    If you execute custom build tasks, learn how toadapt to Gradle’s new task-creation API.

  • For a given build type, when setting useProguard false, the plugin nowuses R8 instead of ProGuard to shrink and obfuscate your app’s code andresources. To learn more about R8, readthis blog postfrom the Android Developer’s Blog.

  • Faster R class generation for library projects: Previously, the AndroidGradle plugin would generate an file for each of your project'sdependencies and then compile those R classes alongside your app's otherclasses. The plugin now generates a JAR containing your app's compiled R classdirectly, without first building intermediate classes. Thisoptimization may significantly improve build performance for projects thatinclude many library subprojects and dependencies, and improve the indexingspeed in Android Studio.

  • When building an Android App Bundle, APKs generated fromthat app bundle that target Android 6.0 (API level 23) or higher now includeuncompressed versions of your native libraries by default. This optimizationavoids the need for the device to make a copy of the library and thus reducesthe on-disk size of your app. If you'd rather disable this optimization, addthe following to your file:

  • The plugin enforces minimum versions of some third-party plugins.

  • Single-variant project sync:Syncing your projectwith your build configuration is an important step in letting Android Studiounderstand how your project is structured. However, this process can betime-consuming for large projects. If your project uses multiple buildvariants, you can now optimize project syncs by limiting them to only thevariant you have currently selected.

    You need to use Android Studio 3.3 or higher with Android Gradle Plugin 3.3.0or higher to enable this optimization. When you meet these requirements, theIDE prompts you to enable this optimization when you sync your project. Theoptimization is also enabled by default on new projects.

    To enable this optimization manually, click File > Settings > Experimental> Gradle (Android Studio > Preferences > Experimental > Gradle on aMac) and select the Only sync the active variant checkbox.

    Note: This optimization fully supports projects thatinclude Java and C++ languages, and has some support for Kotlin. When enablingthe optimization for projects with Kotlin content, Gradle sync falls back tousing full variants internally.

  • Automatic downloading of missing SDK packages: This functionality hasbeen expanded to support NDK. To learn more, readAuto-download missing packages with Gradle.

Bug Fixes

  • Android Gradle plugin 3.3.0 fixes the following issues:

    • The build process calling of the AndroidX version, despite Jetifier being enabled
    • Clashes due to androidx-rs.jar including statically bundledannotation.AnyRes
    • When using RenderScript, you no longer have to manually set the Build Toolsversion in your build.gradle files

3.2.0 (September 2018)

This version of the Android plugin requires the following:

  • Gradle 4.6 or higher.To learn more, read the section aboutupdating Gradle.
  • SDK Build Tools 28.0.3 or higher.

3.2.1 (October 2018)

With this update, you no longer need to specify a version for the SDK Build Tools. The Android Gradle plugin now uses version 28.0.3 by default.

New features

  • Support for building Android App Bundles: The app bundle is a new uploadformat that includes all your app’s compiled code and resources whiledeferring APK generation and signing to the Google Play Store. You no longerhave to build, sign, and manage multiple APKs, and users get smaller downloadsthat are optimized for their device. To learn more, readAbout Android App Bundles.

  • Support for improved incremental build speeds when using annotation processors:The AnnotationProcessorOptionsDSL now extends CommandLineArgumentProvider,which enables either you or the annotation processor author to annotatearguments for the processor usingincremental build property type annotations.Using these annotations improves the correctness and performance ofincremental and cached clean builds. To learn more, readPass arguments to annotation processors.

  • Migration tool for AndroidX: When using Android Gradle plugin 3.2.0 withAndroid 3.2 and higher, you can migrate your project’s local and Mavendependencies to use the new AndroidX libraries by selecting Refactor >Migrate to AndroidX from the menu bar. Using this migration tool also setsthe following flags to true in your file:

    • android.useAndroidX: When set to true, the Android plugin uses theappropriate AndroidX library instead of a Support Library. When this flagis not specified, the plugin sets it to false by default.
    • android.enableJetifier: When set to true, the Android pluginautomatically migrates existing third-party libraries to use AndroidX byrewriting their binaries. When this flag is not specified, the plugin setsit to false by default. You can set this flag to true only whileandroid.useAndroidX is also set to true, otherwise you get a build error.

    To learn more, read the AndroidX overview.

  • New code shrinker, R8: R8 is a new tool for code shrinking and obfuscationthat replaces ProGuard. You can start using the preview version of R8 byincluding the following in your project’s file:

Behavior changes

  • Desugaring with D8 is now enabled by default.
  • AAPT2 is now on Google's Maven repo. To use AAPT2, make sure that you have thegoogle() dependency in your build.gradle file, as shown below:

  • Native multidex is now enabled by default. Previous versions of AndroidStudio enabled native multidex when deploying the debug version of an app to adevice running Android API level 21 or higher. Now, whether you’re deployingto a device or building an APK for release, the Android Gradle pluginenables native multidex for all modules that set minSdkVersion=21 or higher.

  • The plugin now enforces a minimum version of the protobuf plugin (0.8.6),Kotlin plugin (1.2.50), and Crashlytics plugin (1.25.4).

  • The feature module plugin,, now enforces the use of onlyletters, digits, and underscores when specifying a module name. For example,if your feature module name includes dashes, you get a build error. Thisbehavior matches that of the dynamic feature plugin.

Bug fixes

  • JavaCompile is now cacheable in projects with data binding.(Issue #69243050)
  • Better compile avoidance for library modules with data binding.(Issue #77539932)
  • You can now re-enableconfigure-on-demandif you've disable it in earlier versions due to someunpredictable build errors.(Issue #77910727)

3.1.0 (March 2018)

This version of the Android plugin requires the following:

  • Gradle 4.4 or higher.To learn more, read the section aboutupdating Gradle.
  • Build Tools 27.0.3 or higher.Keep in mind, you no longer need to specify a version for the buildtools using the android.buildToolsVersion property—the plugin uses theminimum required version by default.

New DEX compiler, D8

By default, Android Studio now uses a new DEXcompiler called D8. DEX compilation is the process of transforming .classbytecode into .dex bytecode for the Android Runtime (or Dalvik, for olderversions of Android). Compared to the previous compiler, called DX, D8compiles faster and outputs smaller DEX files, all while having the same orbetter app runtime performance.

D8 shouldn't change your day-to-day app development workflow. However, if youexperience any issues related to the new compiler, pleasereport a bug. You can temporarily disable D8 anduse DX by including the following in your project's file:

For projects thatuse Java 8 language features,incremental desugaring is enabled by default. You can disable it byspecifying the following in your project's file:

Preview users: If you're already using a preview version of D8, note that it now compiles against libraries included in the SDK build tools—not the JDK. So, if you are accessing APIs that exist in the JDK but not in the SDK build tools libraries, you get a compile error.

Behavior changes

  • When building multiple APKs thateach target a different ABI, the plugin no longer generates APKs for thefollowing ABIs by default: mips, mips64, and armeabi.

    If you want to build APKs that target these ABIs, you must useNDK r16b or lower and specify the ABIsin your build.gradle file, as shown below:

  • The Android plugin's build cache nowevicts cache entries that are older than 30 days.
  • Passing 'auto' toresConfigno longer automatically picks string resources to package into your APK. Ifyou continue to use 'auto', the plugin packages all string resources yourapp and its dependencies provide. So, you should instead specify each localethat you want the plugin to package into your APK.
  • Because local modules can't depend on your app's test APK, addingdependencies to your instrumented tests using the androidTestApiconfiguration, instead of androidTestImplementation, causes Gradle to issuethe following warning:


  • Fixes an issue where Android Studio doesn't properly recognize dependencies incomposite builds.
  • Fixes an issue where you get a project sync error when loading the Androidplugin multiple times in a single build–for example, when multiple subprojectseach include the Android plugin in their buildscript classpath.

3.0.0 (October 2017)

Android Gradle plugin 3.0.0 includes a variety of changes that aim toaddress performance issues of large projects.

For example, on asample skeleton projectwith ~130 modules and a large number of external dependencies (but nocode or resources), you can experience performance improvements similar to thefollowing:

Android plugin version + Gradle versionAndroid plugin 2.2.0 + Gradle 2.14.1Android plugin 2.3.0 + Gradle 3.3Android plugin 3.0.0 + Gradle 4.1
Configuration (e.g. running ./gradlew --help)~2 mins~9 s~2.5 s
1-line Java change (implementation change)~2 mins 15 s~29 s~6.4 s

Some of these changes break existing builds. So, you should consider the effortof migrating your project before using the new plugin.

If you don't experience the performance improvements described above, pleasefile a bugand include a trace of your build using theGradle Profiler.

This version of the Android plugin requires the following:

  • Gradle 4.1 or higher.To learn more, read the section aboutupdating Gradle.
  • Build Tools 26.0.2 or higher.With this update, you no longer need to specify a version for the buildtools—the plugin uses the minimum required version by default.So, you can now remove the android.buildToolsVersion property.

3.0.1 (November 2017)

This is a minor update to support Android Studio 3.0.1, and includes general bug fixes and performance improvements.


  • Better parallelism for multi-module projects through a fine grained task graph.
  • When making changes to dependency, Gradle performs faster builds by notre-compiling modules that do not have access to that dependency's API.You should restrict which dependencies leak their APIs to other modules byusing Gradle's new dependency configurations:implementation, api, compileOnly, and runtimeOnly.
  • Faster incremental build speed due to per-class dexing. Each class is nowcompiled into separate DEX files, and only the classes that aremodified are re-dexed. You should also expect improved build speeds forapps that set minSdkVersion to 20 or lower, and use legacy multi-dex.
  • Improved build speeds by optimizing certain tasks to use chached outputs.To benefit from this optimization, you need to firstenable the Gradle build cache.
  • Improved incremental resource processing using AAPT2, which is now enabled bydefault.If you are experiencing issues while using AAPT2, pleasereport a bug. You can also disable AAPT2 bysetting android.enableAapt2=false in your file andrestarting the Gradle daemon by running ./gradlew --stop from the commandline.

New features

  • Variant-aware dependency management.When building a certain variant ofa module, the plugin now automatically matches variants of local librarymodule dependencies to the variant of the module you are building.
  • Includes a new Feature module plugin to supportAndroid Instant Apps and the AndroidInstant Apps SDK (which you can downloadusing the SDK manager).To learn more about creating Feature modules with the new plugin, readStructure of an instant app with multiple features.
  • Built-in support for using certain Java 8 language features and Java 8libraries.Jack is now deprecated and no longer required, and you should firstdisable Jack to use the improved Java 8 support built into the defaulttoolchain. For more information, read Use Java 8 language features.
  • Added support for running tests withAndroid Test Orchestrator,which allows you to run each of your app's tests withinits own invocation of Instrumentation. Because each testruns in its own Instrumentation instance, any sharedstate between tests doesn't accumulate on your device's CPU or memory. And,even if one test crashes, it takes down only its own instance ofInstrumentation, so your other tests still run.
    • Added testOptions.execution to determine whether to use on-device testorchestration. If you want touse Android Test Orchestrator,you need to specify ANDROID_TEST_ORCHESTRATOR, as shown below.By default, this property is set to HOST, which disables on-deviceorchestration and is the standard method of running tests.
  • New androidTestUtil dependency configuration allows you to installanother test helper APK before running your instrumentation tests,such as Android Test Orchestrator:
  • Added testOptions.unitTests.includeAndroidResources to support unit teststhat require Android resources, such as Roboelectric.When you set this property to true, the pluginperforms resource, asset, and manifest merging before running your unit tests.Your tests can then inspect com/android/tools/ on theclasspath for the following keys:
    • android_merged_assets: the absolute path to the merged assets directory.

      Note: For library modules, the merged assets do not contain the assets of dependencies(see issue #65550419).

    • android_merged_manifest: the absolute path to the merged manifest file.
    • android_merged_resources: the absolute path to the merged resourcesdirectory, which contains all the resources from the module and all its dependencies.
    • android_custom_package: the package name of the final R class. Ifyou dynamically modify the application ID, this package name may notmatch the package attribute in the app's manifest.
  • Support for fonts as resources(which is a new feature introduced in Android 8.0 (API level 26)).
  • Support for language-specific APKs withAndroid Instant Apps SDK 1.1and higher.
  • You can now change the output directory for your external native buildproject, as shown below:
  • You can now use CMake 3.7 or higherwhen building native projects from Android Studio.
  • New lintChecks dependency configuration allows you to build a JAR thatdefines custom lint rules, and package it into your AAR and APK projects.Your custom lint rules must belong to a separate project that outputs a singleJAR and includes onlycompileOnlydependencies. Other app and library modules can then depend on your lint projectusing the lintChecks configuration:

Behavior changes

  • Android plugin 3.0.0 removes certain APIs, and your build will break if youuse them. For example, you can no longer use the Variants API to accessoutputFile() objects or use processManifest.manifestOutputFile() to getthe manifest file for each variant. To learn more, readAPI changes.
  • You no longer need to specify a version for the build tools (so, you can nowremove the android.buildToolsVersion property). By default,the plugin automatically uses the minimum required build tools version for theversion of Android plugin you're using.
  • You now enable/disable PNG crunching in the buildTypes block, as shown below.PNG crunching is enabled by default for all builds except debug builds becauseit increases build times for projects that include manyPNG files. So, to improve build times for other build types, you should eitherdisable PNG crunching orconvert your images to WebP.
  • The Android plugin now automatically builds executable targets that youconfigure in your external CMake projects.
  • You must nowadd annotation processorsto the processor classpath using the annotationProcessor dependencyconfiguration.
  • Using the deprecated ndkCompile is now more restricted. You should insteadmigrate to using either CMake or ndk-build to compile native code that youwant to package into your APK. To learn more, readMigrate from ndkcompile.

2.3.0 (February 2017)

2.3.3 (June 2017)

This is a minor update that adds compatibility with Android Studio 2.3.3.

2.3.2 (May 2017)

This is a minor update that adds compatibility with Android Studio 2.3.2.

2.3.1 (April 2017)

This is a minor update to Android plugin 2.3.0 that fixes an issue where some physical Android devices did not work properly with Instant Run (seeIssue #235879).

  • Gradle 3.3 or higher.
  • Build Tools 25.0.0 or higher.
  • Uses Gradle 3.3, which includes performance improvements and new features. For more details, see the Gradle release notes.
  • Build cache: stores certain outputs that the Android plugin generates when building your project (such as unpackaged AARs and pre-dexed remote dependencies). Your clean builds are much faster while using the cache because the build system can simply reuse those cached files during subsequent builds, instead of recreating them. Projects using Android plugin 2.3.0 and higher use the build cache by default. To learn more, read Improve Build Speed with Build Cache.
    • Includes a cleanBuildCache task that clears the build cache.
    • If you are using the experimental version of build cache (included in earlier versions of the plugin), you should update your plugin to the latest version.
  • Supports changes to Instant Run included in Android Studio 2.3.
  • Configuration times for very large projects should be significantly faster.
  • Fixed issues with auto-downloading for the constraint layout library.
  • Plugin now uses ProGuard version 5.3.2.
  • Includes many fixes forreported bugs. Please continue to file bug reports when you encounter issues.

2.2.0 (September 2016)

  • Gradle 2.14.1 or higher.
  • Build Tools 23.0.2 or higher.
  • Uses Gradle 2.14.1, which includes performance improvements and new features, and fixes a security vulnerability that allows local privilege escalation when using the Gradle daemon. For more details, see theGradle release notes.
  • Using the externalNativeBuild {} DSL, Gradle now lets you link to your native sources and compile native libraries using CMake or ndk-build. After building your native libraries, Gradle packages them into your APK. To learn more about using CMake and ndk-build with Gradle, read Add C and C++ Code to Your Project.
  • When you run a build from the command line, Gradle now attempts to auto-download any missing SDK components or updates that your project depends on. To learn more, read Auto-download missing packages with Gradle.
  • A new experimental caching feature lets Gradle speed up build times by pre-dexing, storing, and reusing the pre-dexed versions of your libraries. To learn more about using this experimental feature, read the Build Cache guide.
  • Improves build performance by adopting a new default packaging pipeline which handles zipping, signing, and zipaligning in one task. You can revert to using the older packaging tools by adding android.useOldPackaging=true to your file. While using the new packaging tool, the zipalignDebug task is not available. However, you can create one yourself by calling the createZipAlignTask(String taskName, File inputFile, File outputFile) method.
  • APK signing now uses APK Signature Schemev2 in addition to traditional JAR signing. All Android platforms accept theresulting APKs. Any modification to these APKs after signing invalidates theirv2 signatures and prevents installation on a device. To disable this feature,add the following to your module-level build.gradle file:
  • For multidex builds, you can now use ProGuard rules to determine whichclasses Gradle should compile into your app’s main DEX file. Becausethe Android system loads the main DEX file first when starting your app, youcan prioritize certain classes at startup by compiling them into the main DEXfile. After you create a ProGuard configuration file specifically for yourmain DEX file, pass the configuration file’s path to Gradle usingbuildTypes.multiDexKeepProguard. Using this DSL is differentfrom using buildTypes.proguardFiles, which provides general ProGuardrules for your app and does not specify classes for the main DEX file.
  • Adds support for the android:extractNativeLibs flag,which can reduce the size of your app when you install it on adevice. When you set this flag to false in the<application>element of your app manifest, Gradle packages uncompressed andaligned versions of your native libraries with your APK. Thisprevents PackageManagerfrom copying out your native libraries from the APK to the device'sfile system during installation and has the added benefit of makingdelta updates of your app smaller.
  • You can now specify versionNameSuffix and applicationIdSuffix for product flavors. (Issue 59614)
  • getDefaultProguardFile now returns the default ProGuardfiles that Android plugin for Gradle provides and no longeruses the ones in the Android SDK.
  • Improved Jack compiler performance and features:
    • Jack now supports Jacoco test coverage when settingtestCoverageEnabled to true.
    • Improved support for annotation processors. Annotationprocessors on your classpath, such as any compiledependencies, are automatically applied to your build. You canalso specify an annotation processor in your build and passarguments by using the javaCompileOptions.annotationProcessorOptions {} DSL in yourmodule-level build.gradle file:

      If you want to apply an annotation processor at compiletime but not include it in your APK, use theannotationProcessor dependency scope:

    • For a list of parameters you can set, run the following fromthe command line:

    • By default, if the Gradle daemon's heap size is at least 1.5GB, Jack now runs in the same process as Gradle. To adjust thedaemon heap size, add the following to file:

Gradle 2.14 Download Minecraft

2.1.0 (April 2016)

2.1.3 (August 2016)

This update requires Gradle 2.14.1 and higher. Gradle 2.14.1 includes performance improvements, new features, and an important security fix. For more details, see the Gradle release notes.

  • Gradle 2.10 or higher.
  • Build Tools 23.0.2 or higher.
  • Added support for the N Developer Preview, JDK 8, and Java 8 language features using the Jack toolchain. To find out more, read the N Preview guide.

    Note:Instant Run does not currently work with Jack and will be disabled while using the new toolchain. You only need to use Jack if you are developing for the N Preview and want to use the supported Java 8 language features.

  • Added default support for incremental Java compilation to reduce compilation time during development. It does this by only recompiling portions of the source that have changed or need to be recompiled. To disable this feature, add the following code to your module-level build.gradle file:
  • Added support for dexing-in-process which performs dexing within the build process rather than in a separate, external VM processes. This not only makes incremental builds faster, but also speeds up full builds. The feature is enabled by default for projects that have set the Gradle daemon's maximum heap size to at least 2048 MB. You can do this by including the following in your project's file:

    ```noneorg.gradle.jvmargs = -Xmx2048m```

    If you have defined a value for javaMaxHeapSize in your module-level build.gradle file, you need to set org.gradle.jvmargs to the value of javaMaxHeapSize + 1024 MB. For example, if you have set javaMaxHeapSize to '2048m', you need to add the following to your project's file:

    ```noneorg.gradle.jvmargs = -Xmx3072m```

    To disable dexing-in-process, add the following code to your module-level build.gradle file:

2.0.0 (April 2016)

  • Gradle 2.10 or higher.
  • Build Tools 21.1.1 or higher.
  • Enables Instant Run by supporting bytecode injection, and pushing code and resource updates to a running app on the emulator or a physical device.
  • Added support for incremental builds, even when the app isn’t running. Full build times are improved by pushing incremental changes through the Android Debug Bridge to the connected device.
  • Added maxProcessCount to control how many slave dex processes can be spawned concurrently. The following code, in the module-level build.gradle file, sets the maximum number of concurrent processes to 4:
  • Added an experimental code shrinker to support pre-dexing and reduce re-dexing of dependencies, which are not supported with Proguard. This improves the build speed of your debug build variant. Because the experimental shrinker does not support optimization and obfuscation, you should enable Proguard for your release builds. To enable the experimental shrinker for your debug builds, add the following to your module-level build.gradle file:
  • Added logging support and improved performance for the resource shrinker. The resource shrinker now logs all of its operations into a resources.txt file located in the same folder as the Proguard log files.
Changed behavior:
  • When minSdkVersion is set to 18 or higher, APK signing uses SHA256.
  • DSA and ECDSA keys can now sign APK packages.

    Note: The Android keystore provider no longer supportsDSA keys on Android 6.0 (API level 23) and higher.

Fixed issues:
  • Fixed an issue that caused duplicate AAR dependencies in both the test and main build configurations.

Older releases

Android plugin for Gradle, revision 1.5.0 (November 2015)

  • Gradle 2.2.1 or higher.
  • Build Tools 21.1.1 or higher.
General Notes:

Gradle 2.14 Download Torrent

  • Integrated the Data Binding plugin into the Android plugin for Gradle. To enable it, add the following code to each per-project build.gradle file that uses the plugin:
  • Added a new Transform API to allow third-party plugins to manipulate compiled .class files before they’re converted to .dex files. The Transform API simplifies injecting custom class manipulations while offering more flexibility regarding what you can manipulate. To insert a transform into a build, create a new class implementing one of the Transform interfaces, and register it with android.registerTransform(theTransform) or android.registerTransform(theTransform, dependencies). There’s no need to wire tasks together. Note the following about the Transform API:
    • A transform can apply to one or more of the following: the current project, subprojects, and external libraries.
    • A transform must be registered globally, which applies them to all variants.
    • Internal code processing, through the Java Code Coverage Library (JaCoCo), ProGuard, and MultiDex, now uses the Transform API. However, the Java Android Compiler Kit (Jack) doesn’t use this API: only the javac/dx code path does.
    • Gradle executes the transforms in this order: JaCoCo, third-party plugins, ProGuard. The execution order for third-party plugins matches the order in which the transforms are added by the third party plugins; third-party plugin developers can't control the execution order of the transforms through an API.
  • Deprecated the dex getter from the ApplicationVariant class. You can't access the Dex task through the variant API anymore because it’s now accomplished through a transform. There's currently no replacement for controlling the dex process.
  • Fixed incremental support for assets.
  • Improved MultiDex support by making it available for test projects, and tests now automatically have the dependency.
  • Added the ability to properly fail a Gradle build and report the underlying error cause when the Gradle build invokes asynchronous tasks and there’s a failure in the worker process.
  • Added support for configuring a specific Application Binary Interface (ABI) in variants that contain multiple ABIs.
  • Added support for a comma-separated list of device serial numbers for the ANDROID_SERIAL environment variable when installing or running tests.
  • Fixed an installation failure on devices running Android 5.0 (API level 20) and higher when the APK name contains a space.
  • Fixed various issues related to the Android Asset Packaging Tool (AAPT) error output.
  • Added JaCoCo incremental instrumentation support for faster incremental builds. The Android plugin for Gradle now invokes the JaCoCo instrumenter directly. To force a newer version of the JaCoCo instrumenter, you need to add it as a build script dependency.
  • Fixed JaCoCo support so it ignores files that aren’t classes.
  • Added vector drawable support for generating PNGs at build time for backward-compatibility. Android plugin for Gradle generates PNGs for every vector drawable found in a resource directory that doesn’t specify an API version or specifies an android:minSdkVersion attribute of 20 or lower in the <uses-sdk> element in the app manifest. You can set PNG densities by using the generatedDensities property in the defaultConfig or productFlavor sections of a build.gradle file.
  • Added sharing of the mockable android.jar, which the plugin generates only once and uses for unit testing. Multiple modules, such as app and lib, now share it. Delete $rootDir/build to regenerate it.
  • Changed the processing of Java resources to occur before the obfuscation tasks instead of during the packaging of the APK. This change allows the obfuscation tasks to have a chance to adapt the Java resources following packages obfuscation.
  • Fixed an issue with using Java Native Interface (JNI) code in the experimental library plugin.
  • Added the ability to set the platform version separately from the android:compileSdkVersion attribute in the experimental library plugin.

Android plugin for Gradle, revision 1.3.1 (August 2015)

  • Gradle 2.2.1 or higher.
  • Build Tools 21.1.1 or higher.
General Notes:
  • Fixed the ZipAlign task to properly consume the output of the previous task when using a customized filename.
  • Fixed Renderscript packaging with the NDK.
  • Maintained support for the createDebugCoverageReport build task.
  • Fixed support for customized use of the archiveBaseName property in the build.gradle build> file.
  • Fixed the Invalid ResourceTypelint warning caused by parameter method annotation lookup when running lint outside of Android Studio.

Android plugin for Gradle, revision 1.3.0 (July 2015)

  • Gradle 2.2.1 or higher.
  • Build Tools 21.1.1 or higher.
General Notes:
  • Added support for the property to control the Android task thread pool size from the file or the command line. The following example sets this property to 4.``````
  • Set the default build behavior to exclude LICENSE and LICENSE.txt files from APKs. To include these files in an APK, remove these files from the packagingOptions.excludes property in the build.gradle file. For example:
  • Added the sourceSets task to inspect the set of all available source sets.
  • Enhanced unit test support to recognize multi-flavor andbuild variant source folders. For example, to test an app with multi-flavors flavor1 and flavorA with the Debug build type, the test source sets are:
    • test
    • testFlavor1
    • testFlavorA
    • testFlavor1FlavorA
    • testFlavor1FlavorADebug

    Android tests already recognized multi-flavor source folders.

  • Improved unit test support to:
    • Run javac on main and test sources, even if the useJack property is set to true in your build file.
    • Correctly recognize dependencies for each build type.
  • Added support for specifying instrumentation test-runner arguments from the command line. For example:
  • Added support for arbitrary additional Android Asset Packaging Tool (AAPT) parameters in the build.gradle file. For example:
  • Added support for atest APK module as a separate test module, using the targetProjectPath and targetVariant properties to set the APK path and target variant.

    Note: A test APK module does not support product flavors and can only target a single variant. Also, Jacoco is not supported yet.

  • Added resource name validation before merging resources.
  • When building an AAR (Android ARchive) package for library modules, do not provide an automatic @{applicationId} placeholder in the manifest merger settings. Instead, use a different placeholder, such as @{libApplicationId} and provide a value for it if you want to include application Ids in the archive library.

Android plugin for Gradle, revision 1.2.0 (April 2015)

  • Gradle 2.2.1 or higher.
  • Build Tools 21.1.1 or higher.
General Notes:
  • Enhanced support for running unit tests with Gradle.
    • Added support to include Java-style resources in the classpath when running unit tests directly from Gradle.
    • Added unit test dependency support for Android Archive (AAR) artifacts.
    • Added support for the unitTestVariants property so unit test variants can be manipulated using the build.gradle file.
    • Added the unitTest.all code block under testOptions to configure customized tasks for unit test. The following sample code shows how to add unit test configuration settings using this new option:
    • Fixed the handling of enums and public instance fields in the packaging of the mockable-android.jar file.
    • Fixed library project task dependencies so test classes recompile after changes.
  • Added the testProguardFile property to apply ProGuard files when minifying a test APK.
  • Added the timeOut property to the adbOptions code block for setting the maximum recording time for Android Debug Bridge screen recording.
  • Added support for 280 dpi resources.
  • Improved performance during project evaluation.

Android plugin for Gradle, revision 1.1.3 (March 2015)

  • Gradle 2.2.1 or higher.
  • Build Tools 21.1.1 or higher.
General Notes:
  • Fixed issue with duplicated dependencies on a test app that triggered a ProGuard failure.
  • Fixed Comparator implementation which did not comply with the JDK Comparator contract and generated a JDK 7 error.

Android plugin for Gradle, revision 1.1.2 (February 2015)

Gradle 2.14 Download
  • Gradle 2.2.1 or higher.
  • Build Tools 21.1.1 or higher.
General Notes:
  • Normalized path when creating a mockable JAR for unit testing.
  • Fixed the archivesBaseName setting in the build.gradle file.
  • Fixed the unresolved placeholder failure in manifest merger when building a library test application.

Android plugin for Gradle, revision 1.1.1 (February 2015)

  • Gradle 2.2.1 or higher.
  • Build Tools 21.1.1 or higher.
General Notes:
  • Modified build variants so only variants that package a Wear app trigger Wear-specific build tasks.
  • Changed dependency related issues to fail at build time rather than at debug time. This behavior allows you to run diagnostic tasks (such as 'dependencies') to help resolve the conflict.
  • Fixed the android.getBootClasspath() method to return a value.

Android plugin for Gradle, revision 1.1.0 (February 2015)

  • Gradle 2.2.1 or higher.
  • Build Tools 21.1.1 or higher.
General Notes:
  • Added new unit test support
    • Enabled unit tests to run on the local JVM against a special version of the android.jar file that is compatible with popular mocking frameworks, for example Mockito.
    • Added new test tasks testDebug, testRelease, and testMyFlavorDebug when using product flavors.
    • Added new source folders recognized as unit tests: src/test/java/, src/testDebug/java/, src/testMyFlavor/java/.
    • Added new configurations in the build.gradle file for declaring test-only dependencies, for example, testCompile 'junit:junit:4.11', testMyFlavorCompile 'some:library:1.0'.

      Note: Test-only dependencies are not currently compatible with Jack (Java Android Compiler Kit).

    • Added the android.testOptions.unitTests.returnDefaultValues option to control the behaviour of the mockable android.jar.
  • Replaced Test in test task names with AndroidTest. For example, the assembleDebugTest task is now assembleDebugAndroidTest task. Unit test tasks still have UnitTest in the task name, for example assembleDebugUnitTest.
  • Modified ProGuard configuration files to no longer apply to the test APK. If minification is enabled, ProGuard processes the test APK and applies only the mapping file that is generated when minifying the main APK.
  • Updated dependency management
    • Fixed issues using provided and package scopes.

      Note: These scopes are incompatible with AAR (Android ARchive) packages and will cause a build with AAR packages to fail.

    • Modified dependency resolution to compare the dependencies of an app under test and the test app. If an artifact with the same version is found for both apps, it's not included with the test app and is packaged only with the app under test. If an artifact with a different version is found for both apps, the build fails.
  • Added support for anyDpiresource qualifier in resource merger.
  • Improved evaluation and IDE sync speeds for projects with a large number of Android modules.

Android plugin for Gradle, revision 1.0.1 (January 2015)

  • Gradle 2.2.1 up to 2.3.x.

    Note: This version of the Android plugin for Gradle is not compatible with Gradle 2.4 and higher.

  • Build Tools 21.1.1 or higher.
General Notes:
  • Fixed issue with Gradle build failure when accessing the extractReleaseAnnotations module. (Issue 81638).
  • Fixed issue with Disable passing the --no-optimize setting to the Dalvik Executable (dex) bytecode. (Issue 82662).
  • Fixed manifest merger issues when importing libraries with a targetSdkVersion less than 16.
  • Fixed density ordering issue when using Android Studio with JDK 8.

Android plugin for Gradle, revision 1.0.0 (December 2014)

  • Gradle 2.2.1 up to 2.3.x.

    Note: This version of the Android plugin for Gradle is not compatible with Gradle 2.4 and higher.

  • Build Tools 21.1.1 or higher.
General Notes:
  • Initial plugin release.

Android application build fails with Android Plugin for Gradle 2.2.2 and Gradle version 2.14.1.
But build successful with Android Plugin for Gradle 1.2.3 and Gradle version 2.3

Expected Behavior

Gradle 2.14 Download Mod

Android application should successfully build in command line with Android Plugin for Gradle 2.2.2 and Gradle version 2.14.1

Current Behavior

Android application build fails with Android Plugin for Gradle 2.2.2 and Gradle version 2.14.1. Because it fails to find a symbol in the
Also build fails in the Android Studio with the same reason.


I had to updated the Android Studio to 2.2.2(Latest) and this must use at least Android Plugin for Gradle 2.2.2. Therefore I had to update gradle as well. (Tried both gradle 2.14.1 and gradle 3.2) But build fails with the same reason.

Steps to Reproduce (for bugs)

Have the following settings in the application file


Android SDK is uptodate

And run the gradle build.
Build fails and out put's following errors
error: cannot find symbol
error: cannot find symbol