New features in Android Studio Preview

Android Studio 3.5 has been released to the stable channel. Download it here.

Android Studio 4.0 is currently in the Canary and Dev channels, and Android Studio 3.6 is currently in the Beta channel.

For the latest news on releases, including a list of notable fixes in each release, also see the Release updates.

If you encounter any problems using a preview version of Android Studio, please let us know. Your bug reports help to make Android Studio better.

Android Studio 4.0

This section provides a summary of the new features and changes in Android Studio 4.0.

Separate annotation processing feature removed

The ability to separate annotation processing into a dedicated task has been removed. This option was used to maintain incremental Java compilation when non-incremental annotation processors are used in Java-only projects; it was enabled by setting android.enableSeparateAnnotationProcessing to true in the file, which no longer works.

Instead, you should migrate to using incremental annotation processors to improve build performance.

Build Speed window

When using Android Studio 4.0 Canary 3 with Android Gradle plugin 4.0.0-alpha03 and higher, the Build Speed window is available to help you understand and diagnose issues with your build process, such as disabled optimizations and improperly configured tasks. When using Android Studio 4.0 Canary 3 and higher, you can open the Build Speed window as follows:

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

The Build Speed window organizes possible build issues in a tree on the left. You can inspect and click on each issue to investigate its details in the panel on the right. When Android Studio analyzes your build, it uses the build’s task Critical Path as a starting point and provides a visualization to help you understand how the critical path determines the duration of your build. You can also get details on specific warnings by exploring warning-specific trees, such as those listed under the Always-run Tasks node of the tree.

Build speed chart

What is the critical path?

The critical path represents a collection of build tasks that Gradle executes in series and is most responsible for your build time. Each time you build your app, the Build Speed window provides the critical path for that build. That’s because addressing inefficiencies along the critical path is the best starting point for reducing your overall build time.

Keep in mind, whenever you make changes to the build configuration (for example, by adding or removing tasks, or optimizing a given task), you might see a different critical path. Because build optimization is an iterative process, you might want to use the Build Speed window to address potential build regressions in the new critical path.

Multi Preview

Multi Preview is a visual tool for simultaneously previewing layouts in different devices and configurations, which can help catch potential issues in your layouts.

You can access this feature by clicking on the Multi Preview tab in the top-right corner of the IDE window:

Multi Preview button

You can select from two different configuration sets: Pixel devices and project locales. To switch between these configuration sets, select from the dropdown at the top of the Multi Preview window:

Multi Preview demonstration

Live Layout Inspector

Debug your layout with an updated Live Layout Inspector that provides complete, real-time insights into your app’s UI while it’s deployed to a device.

To open a Layout Inspector window, go to View > Tools Windows > Layout Inspector. Along with many of the same features of the existing Layout Inspector, the Live Layout Inspector also includes:

  • Dynamic layout hierarchy: Updates as the views on the device change.

Dynamic layout hierarchy

  • Property values resolution stack: Investigate where a resource property value originates in the source code and navigate to its location by following the hyperlinks in the properties pane.

Property values resolution stack

  • 3D view: See your app’s view hierarchy at runtime with advanced 3D visualization. To use this feature, in the Live Layout Inspector window simply click on the Layout and rotate it.

Layout inspector: 3D view

You can use the Live Layout Inspector only when deploying your app to devices running API level 29 or higher. You must also enable the feature by navigating to File > Settings > Experimental, and checking the box next to Enable Live Layout Inspector.

Support for Jetpack Compose

Jetpack Compose toolkit provides a modern approach to building your app's UI. The toolkit also brings all of Kotlin's benefits, such as helping you to write concise and idiomatic code that's fully interoperable with Java.

For the best experience developing with Jetpack compose, you should use the latest version of Android Studio 4.0. That’s because when you use Android Studio to develop your app with Jetpack Compose, you can benefit from smart editor features, such as New Project templates and the ability to immediately preview your Compose UI.

To learn more and get started, go to the Jetpack Compose overview.

Java 8 library desugaring in D8 and R8

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

Through a process called desugaring, the DEX compiler, D8, in Android Studio 3.0 and higher already provided substantial support for Java 8 language features (such as lambda expressions, default interface methods, try with resources, and more). In Android Studio 4.0, the desugaring engine has been extended to be able to desugar Java language APIs. This means that you can now include standard language APIs that were available only in recent Android releases (such as java.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 and java.util.OptionalDouble) and some other new classes useful with the above APIs
  • Some additions to java.util.concurrent.atomic (new methods on AtomicInteger, AtomicLong and AtomicReference)
  • ConcurrentHashMap (with bug fixes for Android 5.0)

To support these language APIs, D8 compiles a separate library DEX file that contains an implementation of the missing APIs and includes it in your app. The desugaring process rewrites your app’s code to instead use this library at runtime.

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

android {
  defaultConfig {
    // Required when setting minSdkVersion to 20 or lower
    multiDexEnabled true

  compileOptions {
    // Flag to enable support for the new language APIs
    coreLibraryDesugaringEnabled true
    // Sets Java compatibility to Java 8
    sourceCompatibility JavaVersion.VERSION_1_8
    targetCompatibility JavaVersion.VERSION_1_8

Let us know if you run into issues or if there are other APIs you want supported by filing bugs bugs on our bug tracker.

Support for Kotlin DSL script files

The Android Gradle plugin now supports Kotlin DSL build script files (*.kts). When used with Android Studio, certain IDE features, such as the Project Structure dialog and build script quick fixes, now also support reading and writing to Kotlin build script files.

Smart editor features for ProGuard rules

Android Studio now provides smart editor features when you open ProGuard rules files, such as syntax highlighting, code completion, and error checking. The editor also integrates with your Android Studio project to provide full symbol completion for all classes, methods, and fields, and includes quick navigation and refactoring.

Smart editor features when editing ProGuard rules files

New Motion Editor

Android Studio now includes a visual design editor for the MotionLayout layout type, making it easier to create and preview animations.

The Motion Editor provides a simple interface for manipulating elements from the MotionLayout library that serves as the foundation for animation in Android apps. In previous releases, creating and altering these elements required manually editing constraints in XML resource files. Now, the Motion Editor can generate this XML for you, with support for start and end states, keyframes, transitions, and timelines.

To get started with the Motion Editor:

  1. Create a ConstraintLayout.
  2. Right-click on the preview in the Layout Editor.
  3. Click Convert to MotionLayout, as shown below.

After Android Studio converts your ConstraintLayout to MotionLayout, a Motion Scene file is also added to the directory containing your XML.

The MotionLayout then becomes your root layout, and it appears in the Motion Editor UI. The layout already includes a start ConstraintSet, end ConstraintSet, and a transition going from start to end.

You can use the overview graphic to select a ConstraintSet or Transition and to select components on the selection panel.

Then you can edit the constraints and attributes of either the start or end ConstraintSet the same way you would edit a ConstraintLayout.

If you want to build more elements to your graph, you can use the creation icons to quickly add a ConstraintSet, Transition, or OnClick/OnSwipe gestures.

To add a keyframe, first click on the Transition arrow:

Then, in the Transition timeline pane, click on the top-right corner and select KeyPosition:

This action opens a dialog where you can set attributes for the keyframe.

You can also add OnClick and OnSwipe handlers to the Transition in the attribute panel.

This action opens a dialog where you can set attributes of the click such as target components and drag direction.

The Motion Editor supports previewing animations on the design surface. When an animation is selected, click Play above the timeline to preview the animation.

New in Android Gradle plugin 4.0.0

This section describes new features and behavior changes included in Android Gradle plugin 4.0.0.

New options to enable or disable build features

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

android {
    // The default value for each feature is shown below. You can change the value to
    // override the default behavior.
    buildFeatures {
        // Determines whether to enable support for Jetpack Compose.
        compose = false
        // Determines whether to generate a BuildConfig class.
        buildConfig = true
        // Determines whether to support View Binding.
        // Note that the viewBinding.enabled property is now deprecated.
        viewBinding = false
        // Determines whether to support Data Binding.
        // Note that the dataBinding.enabled property is now deprecated.
        dataBinding = false
        // Determines whether to generate binder classes for your AIDL files.
        aidl = true
        // Determines whether to support RenderScript.
        renderScript = true
        // Determines whether to support injecting custom variables into the module’s R class.
        resValues = true
        // Determines whether to support shader AOT compilation.
        shaders = true

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


Feature-on-feature dependencies

In previous versions of the Android Gradle plugin, all Dynamic Feature modules could depend only on the app's base module. When using Android Gradle plugin 4.0.0, you can now include a feature module that depends on another feature module. That is, a :video feature can depend on the :camera feature, which depends on the base module, as shown in the figure below.

Feature on feature dependencies

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

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

// In the build.gradle file of the ':video' module.
dependencies {
    // All dynamic feature modules must declare a dependency
    // on the base module.
    implementation project(':app')
    // Declares that this module also depends on the 'camera'
    // dynamic feature module.
    implementation project(':camera')

Additionally, you should enable the feature-on-feature dependency feature in Android Studio (to support the feature when editing the Run configuration, for example) by clicking Help > Edit Custom VM Options from the menu bar and including the following:


'feature' and 'instantapp' Android Gradle plugins removed

Android Gradle plugin 3.6.0 deprecated the Feature plugin ( and the Instant App plugin ( in favor of using the Dynamic Feature plugin ( to build and package your instant apps using Android App Bundles.

In Android Gradle plugin 4.0.0-alpha01 and higher, these deprecated plugins are fully removed. So, to use the latest Android Gradle plugin, you need to migrate your instant app to support Android App Bundles. By migrating your instant apps, you can leverage the benefits of app bundles and simplify your app's modular design.

Kotlin Android live templates

Android Studio now includes Android live templates for your Kotlin classes. For example, you can now type toast and press the Tab key to quickly insert a Toast. For a full list of available live templates, click File > Settings from the menu bar (or Android Studio > Preferences on macOS) and navigate to Editor > Live Templates.

Fragment wizard and new fragment templates

A New Android Fragment wizard and new fragment templates are now available when you navigate to File > New > Fragment > Gallery or click Create new destination in the Navigation editor.

The Fragment gallery wizard.

The Fragment gallery wizard.

Known Issues for 4.0 Preview

This section describes current known issues in Android Studio 4.0 Preview.

Patches Not Available for Canary 5

No patches for Android Studio 4.0 Canary 5 are available for previously released Android Studio 4.0 Canary versions. To install Android Studio 4.0 Canary 5, please download it from the Android Studio downloads page.

Layout Inspector in Canary 5

In Android Studio 4.0 Canary 5, the Layout Inspector does not function correctly.

Missing Kotlin Maven repo

If you upgrade an existing project to use Android Studio 4.0, you might see the following error message:

Application build has failed with an error (Could not find org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.60-eap-25)

To resolve this issue, include the following in your project's top-level build.gradle file:

buildscript {
    repositories {
        maven { url '' }

allprojects {
    repositories {
        maven { url '' }

Android Studio 3.6

This section provides a summary of the new features and changes in Android Studio 3.6.

Attach Kotlin-only APK sources to Profiler

It is now possible to attach Kotlin-only external APK sources to the Profiler. Follow the user guide for attaching Java files (.java), but instead select your Kotlin source files (.kt).

Split view in design editors

Design editors, such as the Layout Editor and Navigation Editor, now provide a Split view that enables you to see both the Design and Code views of a your UI at the same time. To enable split view, click the Split icon split view icon in the top-right corner of the editor window.

split view shows both the design and text views at the same time

Leak detection in Memory Profiler

When analyzing a heap dump in the Memory Profiler, you can now filter profiling data that Android Studio thinks might indicate memory leaks for Activity and Fragment instances in your app.

The types of data that the filter shows include the following:

  • Activity instances that have been destroyed but are still being referenced.
  • Fragment instances that do not have a valid FragmentManager but are still being referenced.

In certain situations, such as the following, the filter might yield false positives:

  • A Fragment is created but has not yet been used.
  • A Fragment is being cached but not as part of a FragmentTransaction.

To use this feature, first capture a heap dump or import a heap dump file into Android Studio. To display the fragments and activities that may be leaking memory, select the Activity/Fragment Leaks checkbox in the heap dump pane of the Memory Profiler.

Profiler: Memory Leak Detection

Filtering a heap dump for memory leaks.

Apply Changes

You can now add a class and then deploy that code change to your running app by clicking either Apply Code Changes Apply Code Changes icon or Apply Changes and Restart Activity Apply Changes icon.

To learn more about the difference between these two actions, see Apply Changes.

Import an updated APK

You no longer need to create a new project when the APK in your project is updated outside the IDE. Android Studio detects changes in the APK and gives you the option to re-import it.

NDK updates

The following updates support native (C/C++) development in Android Studio.

Kotlin support

The following NDK features in Android Studio, previously supported in Java, are now also supported in Kotlin:

  • Navigate from a JNI declaration to the corresponding implementation function in C/C++. View this mapping by hovering over the C or C++ item marker near the line number in the managed source code file.
  • Automatically create a stub implementation function for a JNI declaration. Define the JNI declaration first and then type “jni” or the method name in the C/C++ file to activate.

  • Unused native implementation functions are highlighted as a warning in the source code. JNI declarations with missing implementations are also highlighted as an error.

  • When you rename (refactor) a native implementation function, all corresponding JNI declarations are updated. Rename a JNI declaration to update the native implementation function.

  • Signature checking for implicitly-bound JNI implementations.

Other JNI improvements

  • Cosmetics

    • Type hints for parameter and return values are shown in JNI implementation functions.
    • JNI-mangled function names can be folded.

  • RegisterNatives support

    • Auto-completion for the method declaration name, parameter types, and return type.

    • Rename refactoring of the method declaration name.

    • Signature-checking for bound JNI functions.

  • Other JNI function assistance

    • Auto-completion, inspection, navigation, and rename refactoring support for string literals in the following:
      • FindClass
      • GetMethodID and GetStaticMethodID
      • GetFieldID and GetStaticFieldID
    • Various inspections for the following:
      • Call[Static]<type>Method
      • CallNonvirtual<type>Method
      • Get[Static]<type>Field
      • NewObject

Updates to the Android Gradle plugin

The following updates are available when you use the latest preview version of the Android Gradle plugin.

Support for the Maven Publish plugin

Android Gradle plugin 3.6-alpha07 and higher includes support for the Maven Publish Gradle plugin, which allows you to publish build artifacts to an Apache Maven repository. The Android Gradle plugin creates a component for each build variant artifact in your app or library module that you can use to customize a publication to a Maven repository.

The components that the Android plugin creates depend on whether the module uses the application or library plugin, as described in the table below.

Android Gradle plugin Publication artifact Component name AAR components.variant A ZIP of APK(s), and available ProGuard or R8 mappings files components.variant_apk An Android App Bundle (AAB) components.variant_aab

The following code sample creates a publication for the release and debug build variants of an AAR library. Each publication applies the matching component and customizes attributes of the generated POM, such as the Maven coordinates.

// Because the components are created only during the afterEvaluate phase, you must
// configure your publications using the afterEvaluate() lifecycle method.
afterEvaluate {
    publishing {
        publications {
            // Creates a Maven publication called "release".
            release(MavenPublication) {
                // Applies the component for the release build variant.
                from components.release

                // You can then customize attributes of the publication as shown below.
                groupId = 'com.example.MyLibrary'
                artifactId = 'final'
                version = '1.0'
            // Creates a Maven publication called “debug”.
            debug(MavenPublication) {
                // Applies the component for the debug build variant.
                from components.debug

                groupId = 'com.example.MyLibrary'
                artifactId = 'final-debug'
                version = '1.0'

To create a publication that publishes your app as either a ZIP file of APKs or an Android App Bundle (AAB), simply use the appropriate component, as shown below.

afterEvaluate {
    publishing {
        publications {
            paidRelease(MavenPublication) {
              // The following applies a component to this publication
              // which results in publishing an app bundle.
              from components.paidRelease_aab

              groupId = 'com.example.MyApp'
              artifactId = 'paid-release-aab'
              version = '1.0'
            paidDebug(MavenPublication) {
              // The following applies a component to this publication
              // which results in publishing APKs in a ZIP file.
              from components.paidDebug_apk

              groupId = 'com.example.MyApp'
              artifactId = 'paid-debug-apks'
              version = '1.0'

After you create publications, the Maven Publish plugin creates publishing tasks that you can use to publish your artifact to the repositories that you specify.

New default packaging tool

When using Android Gradle plugin 3.6.0-alpha09 or higher to build the debug version of your app, the plugin uses a new packaging tool, called zipflinger, to build your APK. This new tool should provide build speed improvements. However, if you experience issues, please report a bug. You can also revert to using the old packaging tool by including the following in your file:


Refactor menu option to enable Instant Apps support

You can now instant-enable your base module at any time after creating your app project as follows:

  1. Open the Project panel by selecting View > Tool Windows > Project from the menu bar.
  2. Right-click on your base module, typically named 'app', and select Refactor > Enable Instant Apps Support.
  3. In the dialog that appears, select your base module from the dropdown menu.
  4. Click OK.

To learn more, read Overview of Google Play Instant.

Deobfuscate class and method bytecode in APK Analyzer

When inspecting DEX files, the APK Analyzer now supports deobfuscating class and method bytecode. To deobfuscate the bytecode, proceed as follows:

  1. Select Build > Analyze APK from the menu bar.
  2. In the dialog that appears, navigate to the APK you want to inspect and select it.
  3. Click Open.
  4. In the APK Analyzer, select the DEX file you want to inspect.
  5. In the DEX file viewer, load the ProGuard mappings file for the APK you’re analyzing.
  6. Right-click on the class or method you want to inspect and select Show bytecode.

View binding

View binding provides compile-time safety when referencing views in your code. You can now replace findViewById() with the auto-generated binding class reference.

To start using View binding, include the following in each module's build.gradle file:

android {
    viewBinding.enabled = true

To learn more, read the View Binding documentation. If you have any feedback or encounter any issues, please report a bug.

Resumable SDK downloads

When downloading SDK components and tools using the SDK Manager, Android Studio now allows you to resume downloads that were interrupted (for example, due to a network issue) instead of restarting the download from the beginning. This enhancement is especially helpful for large downloads, such as the Android Emulator or system images, when internet connectivity is unreliable.

In addition, if you have an SDK download task running in the background, you can now pause or resume the download using the controls in the status bar.

A background download task in the status bar with new controls that
          let you pause or resume the download.

A background download task in the status bar with new controls that let you pause or resume the download.

IntelliJ IDEA 2019.2

The core Android Studio IDE has been updated with improvements from IntelliJ IDEA through the 2019.2 release, such as the Services tool window.

To learn more about the improvements from other IntelliJ versions that are included cumulatively with version 2019.2, see the following pages:

New location to toggle Gradle's offline mode

To enable or disable Gradle's offline mode, first select View > Tool Windows > Gradle from the menu bar. Then, near the top of the Gradle window, click Toggle Offline Mode Gradle offline button in the Gradle panel..

Known Issues for 3.6 Preview

This section describes current known issues in Android Studio 3.6 Preview.

Small UI text on Chrome OS

On Chrome OS, text might appear much smaller than in previous releases. To work around this issue, do the following:

  1. Open the Settings window by clicking File > Settings (on macOS, Android Studio > Preferences)
  2. Navigate to Appearance & Behavior > Appearance.
  3. Select Use custom font.
  4. Increase the font size.
  5. In the Settings window, navigate to Editor > Font.
  6. Increase the font size.
  7. Click OK.