Google is committed to advancing racial equity for Black communities. See how.

Android Studio is the official IDE for Android development, and includes everything you need to build Android apps.

To get the latest version, click Help > Check for updates (Android Studio > Check for updates on macOS).

You can also download Android Studio here.

If you encounter problems in Android Studio, check the Known issues or Troubleshoot page.

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

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

4.0 (May 2020)

Android Studio 4.0 is a major release that includes a variety of new features and improvements.

Android Gradle plugin 4.0.0

The latest version of the Android Gradle plugin includes many updates, such as Java 8 desugaring for older versions of Android and feature-on-feature dependencies. To learn more, read the full Android Gradle plugin release notes.

Additionally, Android Studio now includes new features to help you improve your build performance.

Build Analyzer

When using Android Studio 4.0 with Android Gradle plugin 4.0.0 and higher, the Build Analyzer window helps you understand and diagnose issues with your build process, such as disabled optimizations and improperly configured tasks. To open the Build Analyzer window, proceed as follows:

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

tab. After Android Studio finishes building your project, click the link in the right side of the Build Output window.

The Build Analyzer 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 computes the set of tasks that determined the build’s duration and provides a visualization to help you understand the impact of each of these tasks. You can also get details on warnings by expanding the Warnings node.

Inspecting the tasks that determined the build’s duration.

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 ( java.util.stream )

) 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

, and ) and some other new classes useful with the above APIs Some additions to java.util.concurrent.atomic (new methods on AtomicInteger , AtomicLong and AtomicReference )

(new methods on , and ) 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 } } dependencies { coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.0.4' }

Feature-on-feature dependencies

In previous versions of the Android Gradle plugin, all feature modules could depend only on the app's base module. When using Android Gradle plugin 4.0.0 and higher, 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 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, the app also downloads other feature modules it depends on. After you create 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 feature modules must declare a dependency // on the base module. implementation project(':app') // Declares that this module also depends on the 'camera' 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:

-Drundebug.feature.on.feature=true

Dependencies metadata

When building your app using Android Gradle plugin 4.0.0 and higher, the plugin includes metadata that describes the dependencies that are compiled into your app. When uploading your app, the Play Console inspects this metadata to provide you 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 in the signing block of your release app. However, you can inspect the metadata yourself 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 the following in your module’s build.gradle file:

android { dependenciesInfo { // Disables dependency metadata when building APKs. includeInApk = false // Disables dependency metadata when building Android App Bundles. includeInBundle = false } }

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.

CPU Profiler upgrades

Based on your feedback, we've focused our efforts on improving the user experience in the CPU Profiler in two important ways.

First, compared to previous Android Studio releases, error rates for CPU recordings in the CPU Profiler have been reduced significantly.

Second, the CPU Profiler UI has been overhauled to provide a more intuitive workflow. Some notable UI changes include the following:

CPU recordings are now separated from the main profiler timeline to allow for easier analysis. Recorded data are organized in groups on the left side of the Profiler window. You can move groups up and down to reorganize the list by clicking the options iconicon in the top-right corner of the window, or by dragging-and-dropping individual items within a group.

window. You can move groups up and down to reorganize the list by clicking the options iconicon in the top-right corner of the window, or by dragging-and-dropping individual items within a group. For easier side-by-side analysis, you can now view all thread activity in the thread activity timeline (including methods, functions, and events). There are several ways to navigate the timeline: To focus on a specific point in time, drag a range in the CPU usage chart on the top left. To zoom in or out, use the mouse wheel while holding down Control (or Command on MacOS). To pan left or right, drag while holding down the spacebar. Alternatively, use the W and A keys for fine-grained zooming in and out, and the S and D keys for fine-grained panning left and right.

The tabs for Flame Chart , Top Down , and Bottom Up analyses are now in the righthand column. In the Threads group, threads are automatically expanded for System Trace recordings and collapsed by default for other recording types. Double-click (or press Enter) on thread names to expand or collapse them.

, , and analyses are now in the righthand column. In the Threads group, threads are automatically expanded for System Trace recordings and collapsed by default for other recording types. Double-click (or press Enter) on thread names to expand or collapse them. The System Trace UI, as shown in the screenshot, also includes improvements: Events are now uniquely colored for easier differentiation. Threads are sorted by the number of trace events within them so that the “busier” threads are ranked higher in the list. You can select one or more threads to see analysis in the right hand column for those selected threads only. Similarly you can select a trace event within any thread to see analysis data for it.



This version of Android Studio includes updates to the design tools, such as the Layout Inspector and an all-new Motion Editor.

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 learn more about how to use the Motion Editor, see the user guide.

Note: Before using the Motion Editor, be sure to set the ConstraintLayout dependency in your build.gradle file to version 2.0.0-beta3 or higher.

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.

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.

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.

You can use the Live Layout Inspector only when deploying your app to a device or emulator running API level 29 or higher. To enable the Live Layout Inspector, go to File > Settings > Experimental and check the box next to Enable Live Layout Inspector. Then click the checkbox next to Live updates above the Layout Display.

Layout Validation

Layout Validation is a visual tool for simultaneously previewing layouts on different devices and configurations, helping you detect layout errors and create more accessible apps.

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

In the Layout Validation window, you can select from four different configuration sets, including:

Pixel Devices: Preview your app on a selection of Pixel devices.

Preview your app on a selection of Pixel devices. Custom: Preview your app using custom display options such as screen orientation or language.

Preview your app using custom display options such as screen orientation or language. Color Blind: Preview your app using simulations of common types of color blindness.

Preview your app using simulations of common types of color blindness. Font Sizes: Preview your app using a variety of font sizes.

To learn more about using Layout Validation, see Debug Your Layout with Layout Inspector.

Smart editor features for code shrinker rules

Android Studio now provides smart editor features when you open code shrinker rules files for R8, 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.

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.

Expanded camera support in Android emulator

When using the Android 11 image, Android Emulator camera includes the following new features:

RAW capture

YUV reprocessing

Level 3 devices

Logical camera support

To learn more about developing for Android 11, see the Android 11 documentation.

clangd now available for C++ code editor

Jetbrains CLion, the technology underpinning Android Studio's C++ language support, now uses an inspection engine based on LLVM clangd and clang-tidy, speeding up C/C++ code completion and providing a more seamless integration with clang-tidy.

Now available in the Android Studio C++ code editor, clangd and clang-tidy are both part of open-source LLVM extra tooling:

clangd features code completion, compile error messages in the editor, and go-to-definition navigation.

clang-tidy is a C++ linter tool with an extensible framework for diagnosing and fixing typical programming errors.

In prior releases, Android Studio users could use clang-tidy through the NDK; with this change, Android Studio is no longer dependent on the NDK for clang-tidy functionality.

ndk.dir setting in local.properties file is deprecated

The value for ndk.dir should no longer be set in your app's local.properties file, and support for this ndk.dir setting will be removed in a future version. The Android Gradle Plugin sets the NDK version by default, but if you need a specific version of the NDK, you can set android.ndkVersion in build.gradle .

For more information on setting up the NDK, see Install and configure the NDK and CMake.

IntelliJ IDEA 2019.3.3

The core Android Studio IDE has been updated with improvements from IntelliJ IDEA through the 2019.3.3 release.

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

3.6 (February 2020)

Android Studio 3.6 is a major release that includes a variety of new features and improvements.

We'd also like to thank all of our community contributors who have helped with this release.

This version of Android Studio includes updates to several design tools, including the Layout Editor and Resource Manager.

Split view and zoom in design editors

The following updates to the visual design editors are included in this release:

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 your UI at the same time. In the top-right corner of the editor window, there are now three buttons for toggling between viewing options: To enable split view, click the Split icon . To enable XML source view, click the Source icon . To enable design view, click the Design icon .

The controls for zooming and panning within design editors have moved to a floating panel in the bottom-right corner of the editor window.

To learn more, see Build a UI with Layout Editor.

Color Picker Resource Tab

To help you quickly update color resource values in your app when you're using the color picker in your XML or the design tools, the IDE now populates color resource values for you.

Resource Manager

The Resource Manager contains the following updates:

The Resource Manager now supports most resource types.

When searching for a resource, the Resource Manager now displays results from all project modules. Previously, searches returned results only from the selected module.

The filter button lets you view resources from local dependent modules, external libraries, and the Android framework. You can also use the filter to show theme attributes.

You can now rename resources during the import process by clicking within the textbox above the resource.

To learn more, see Manage your app's UI resources with Resource Manager.

Updates to the Android Gradle plugin

The latest version of the Android Gradle plugin includes many updates, including optimizations for build speed, support for the Maven publishing plugin, and support for View Binding. To learn more, read the full release notes.

View binding

View binding allows you to more easily write code that interacts with views by generating a binding class for each XML layout file. These classes contain direct references to all views that have an ID in the corresponding layout.

Because it replaces findViewById() , view binding eliminates the risk of null pointer exceptions resulting from an invalid view ID.

To enable view binding, you need to use Android Gradle plugin 3.6.0 or higher and include the following in each module's build.gradle file:

android { viewBinding.enabled = true }

Apply Changes

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

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

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:

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

Note: The option to instant-enable your base app module from the Create New Project wizard has been removed.

To learn more, read Overview of Google Play Instant.

Deobfuscate class and method bytecode in APK Analyzer

When using the APK Analyzer to inspect DEX files, you can deobfuscate class and method bytecode as follows:

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

Native tooling

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

The code editor in Android Studio now supports a more seamless JNI development workflow, including improved type hints, auto-completion, inspections, and code refactoring.

APK reloading for native libraries

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.

Attach Kotlin-only APK sources

It is now possible to attach Kotlin-only external APK sources when you profile and debug pre-built APKs. To learn more, see Attach Kotlin/Java sources.

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.

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.

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.

Filtering a heap dump for memory leaks.

Emulators

Android Studio 3.6 helps you take advantage of several updates included in Android Emulator 29.2.7 and higher, as described below.

Improved Location Support

Android Emulator 29.2.7 and higher provides additional support for emulating GPS coordinates and route information. When you open the Emulators Extended controls, options in the Location tab are now organized under two tabs: Single points and Routes.

Single points

In the Single points tab, you can use the Google Maps webview to search for points of interest, just as you would when using Google Maps on a phone or browser. When you search for or click on a location in the map, you can save the location by selecting Save point near the bottom of the map. All of your saved locations are listed on the right side of the Extended controls window.

To set the Emulators location to the location you have selected on the map, click the Set location button near the bottom right of the Extended controls window.

.

Routes

Similar to the Single points tab, the Routes tab provides a Google Maps webview that you can use to create a route between two or more locations. To create and save a route, do the following:

In the map view, use the text field to search for the first destination in your route. Select the location from the search results. Select the Navigate button. Select the starting point of your route from the map. (Optional) Click Add destination to add additional stops to your route. Save your route by clicking Save route in the map view. Specify a name for the route and click Save.

To simulate the Emulator following the route you saved, select the route from the list of Saved routes and click Play route near the bottom right of the Extended controls window. To stop the simulation, click Stop route.

.

To continuously simulate the Emulator following the specified route, enable the switch next to Repeat playback. To change how quickly the Emulator follows the specified route, select an option from the Playback speed dropdown.

Multi-display support

The Android Emulator now allows you to deploy your app to multiple displays, which support customizable dimensions and can help you test apps that support multi-window and multi-display. While a virtual device is running, you can add up to two additional displays as follows:

Open the Extended controls and navigate to the Displays tab. Add another display by clicking Add secondary display. From the dropdown menu under Secondary displays, do one of the following: Select one of the preset aspect ratios Select custom and set the height, width, and dpi for your custom display. (Optional) Click Add secondary display to add a third display. Click Apply changes to add the specified display(s) to the running virtual device.

New virtual devices and project templates for Android Automotive OS

When you create a new project using Android Studio, you can now select from three templates from the Automotive tab in the Create New Project wizard: No Activity, Media service, and Messaging service. For existing projects, you can add support for Android Automotive devices by selecting File > New > New Module from the menu bar, and selecting Automotive Module. The Create New Module wizard then guides you through creating a new module using one of the Android Automotive project templates.

.

Additionally, you can now create an Android Virtual Device (AVD) for Android Automotive OS devices by selecting one of the following options in the Automotive tab in the Virtual Device Configuration wizard.

Polestar 2: Create an AVD that emulates the Polestar 2 head unit. Automotive (1024p landscape): Create an AVD for generic 1024 x 768 px Android Automotive head units.

.

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.

Win32 deprecated

The Windows 32-bit version of Android Studio will no longer receive updates after December 2019, and it will no longer receive support after December 2020. You can continue to use Android Studio. However, to receive additional updates, upgrade your workstation to a 64-bit version of Windows.

To learn more, read the Windows 32-bit depreciation blog.

New option for optimizing Gradle sync time

In previous releases, Android Studio retrieved the list of all Gradle tasks during Gradle Sync. For large projects, retrieving the task list could cause slow sync times.

To improve Gradle Sync performance, go to File > Settings > Experimental and select Do not build Gradle task list during Gradle sync.

When you enable this option, Android Studio skips building the task list during sync, which allows Gradle Sync to complete faster and improves UI responsiveness. Keep in mind, when the IDE skips building the task list, the task lists in the Gradle panel are empty, and task name auto-completion in build files does not work.

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 .

IntelliJ IDEA 2019.2

The core Android Studio IDE has been updated with improvements from IntelliJ IDEA through the 2019.2 release.

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

Community contributors

Thank you to all of our community contributors who have helped us discover bugs and other ways to improve Android Studio 3.6. In particular, we'd like to thank the following people who reported bugs:

3.5 (August 2019)

Android Studio 3.5 is a major release and a result of Project Marble. Beginning with the release of Android Studio 3.3, the Project Marble initiative has spanned multiple releases that focus on improving three main areas of the IDE: system health, feature polish, and fixing bugs.

For information about these and other Project Marble updates, read the Android Developers blog post or the sections below.

We also want to thank all of our community contributors who have helped with this release.

Project Marble: System health

This section describes the changes in Android Studio 3.5 that are focused on improving system health.

Recommended memory settings

Android Studio now notifies you if it detects that you could improve performance by increasing the maximum amount of RAM that your OS should allocate for Android Studio processes, such as the core IDE, Gradle daemon, and Kotlin daemon. You can either accept the recommended settings by clicking the action link in the notification, or you can adjust these settings manually by selecting File > Settings (or Android Studio > Preferences on macOS), and then finding the Memory Settings section under Appearance & Behavior > System Settings. To learn more, see Maximum heap size.

A notification about recommended memory settings.

Memory usage report

Memory problems in Android Studio are sometimes difficult to reproduce and report. To help solve this problem, Android Studio lets you generate a memory usage report by clicking Help > Analyze Memory Usage from the menu bar. When you do so, the IDE locally sanitizes the data for personal information before asking whether you want to send it to the Android Studio team to help identify the source of the memory issues. To learn more, see Run a memory usage report.

A memory usage report.

Windows: Antivirus file I/O optimization

Android Studio now automatically checks whether certain project directories are excluded from real-time antivirus scanning. When adjustments can be made to improve build performance, Android Studio notifies you and provides instructions on how to optimize your antivirus configuration. To learn more, see Minimize the impact of antivirus software on build speed.

Project Marble: Feature polish

This section describes the changes in Android Studio 3.5 that are focused on improving existing features.

Apply Changes

Apply Changes lets you push code and resource changes to your running app without restarting your app—and, in some cases, without restarting the current activity. Apply Changes implements a completely new approach for preserving your app’s state. Unlike Instant Run, which rewrote the bytecode of your APK, Apply Changes redefines classes on the fly by leveraging the runtime instrumentation supported in Android 8.0 (API level 26) or higher.

To learn more, see Apply Changes.

The toolbar buttons for Apply Changes.

App deployment flow

The IDE has a new drop-down menu that lets you quickly select which device you'd like to deploy your app to. This menu also includes a new option that lets you run your app on multiple devices at once.

Target device drop-down menu.

Improved Gradle sync and cache detection

The IDE now better detects when Gradle periodically clears your build cache when reducing its hard disk consumption. In previous versions, this state caused the IDE to report missing dependencies and Gradle sync to fail. Now, the IDE simply downloads dependencies as needed to ensure that Gradle sync completes successfully.

Improved build error output

The Build window now provides better error reporting, such as a link to the file and line of the reported error, for the following build processes:

AAPT compilation and linking

R8 and ProGuard

Dexing

Resource merging

XML file parsing

Javac, Kotlinc, and CMake compilation

Project Upgrades

Improved update experience to provide more information and actions to help you update the IDE and the Android Gradle plugin. For example, more sync and build errors include actions to help you mitigate errors when updating.

It’s important to keep in mind, you can update the IDE independently of other components, such as the Android Gradle plugin. So, you can safely update the IDE as soon as a newer version is available, and update other components later.

Layout Editor

Android Studio 3.5 includes several improvements to layout visualization, management, and interaction.

When working with ConstraintLayout , a new Constraints section in the Attributes panel lists the constraints relationships of the selected UI component. You can select a constraint either from the design surface or from the constraints list to highlight the constraint in both areas.

Constraint relationships for a selected UI element.

Similarly, you can now delete a constraint by selecting it and pressing the Delete key. You can also delete a constraint by holding the Control key ( Command on macOS) and clicking on the constraint anchor. Note that when you hold the Control or Command key and hover over an anchor, any associated constraints turn red to indicate that you can click to delete them.

When a view is selected, you can create a constraint by clicking on any of the + icons in the Constraint Widget section of the Attributes panel, as shown in the following image. When you create a new constraint, the Layout Editor now selects and highlights the constraint, providing immediate visual feedback for what you've just added.

Using the constraint widget to create constraints .

When creating a constraint, the Layout Editor now shows only the eligible anchor points to which you can constrain. Previously, the Layout Editor highlighted all anchor points on all views, regardless of whether you could constrain to them. In addition, a blue overlay now highlights the target of the constraint. This highlighting is particularly useful when attempting to constrain to a component that overlaps with another.

Creating a constraint for an overlapping component in Android Studio 3.4.

Creating a constraint for an overlapping component in Android Studio 3.5.

In addition to the above updates, Android Studio 3.5 also contains the following Layout Editor improvements:

The Constraint Widget and default margin drop-down now allow you to use dimension resources for margins.

and default margin drop-down now allow you to use dimension resources for margins. In the Layout Editor toolbar, the list of devices that determine the size of the design surface has been updated. In addition, snapping behavior while resizing has been improved, and the resizing handles on the design surface are now always visible. When resizing, new overlays appear that show common device sizes.

The Layout Editor has a new color scheme that improves consistency and reduces contrast between components, text, and constraints.

Blueprint mode now includes text support for some components where text wasn't being shown.

For more information about these changes, see Android Studio Project Marble: Layout Editor.

Data Binding

In addition to adding incremental annotation processing support for Data Binding, the IDE improves smart editor features and performance when creating data binding expressions in XML.

Code editor performance on Android Studio 3.4.

Improved code editing performance on Android Studio 3.5.

Improved support for C/C++ projects

Android Studio 3.5 includes several changes that improve support for C/C++ projects.

Build Variants panel improvements for single variant sync

You can now specify both the active build variant and active ABI in the Build Variants panel. This feature simplifies build configuration per module and can also improve Gradle sync performance.

To learn more, see Change the build variant.

The Build Variants panel with single variant selection by ABI.

Side-by-side versions of the NDK

You can now use multiple versions of the NDK side-by-side. This feature gives you more flexibility when configuring your projects—for example, if you have projects that use different versions of the NDK on the same machine.

If your project uses Android Gradle plugin 3.5.0 or higher, you can also specify the version of the NDK that each module in your project should use. You can use this feature to create reproducible builds and to mitigate incompatibilities between NDK versions and the Android Gradle plugin.

To learn more, see Install and configure the NDK, CMake, and LLDB.

Chrome OS Support

Android Studio now officially supports Chrome OS devices, such as the HP Chromebook x360 14, Acer Chromebook 13/Spin 13, and others that you can read about in the system requirements. To get started, download Android Studio on your compatible Chrome OS device and follow the installation instructions.

Note: Android Studio on Chrome OS currently supports deploying your app only to a connected hardware device. To learn more, read Run apps on a hardware device

Conditional delivery for feature modules

Conditional delivery allows you to set certain device configuration requirements for feature modules to be downloaded automatically during app install. For example, you can configure a feature module that includes functionality for augmented reality (AR) to be available at app install for only devices that support AR.

This delivery mechanism currently supports controlling the download of a module at app install-time based on the following device configurations:

Device hardware and software features, including OpenGL ES version

User country

API level

If a device does not meet all the requirements you specify, the module is not downloaded at app install-time. However, your app may later request to download the module on demand using the Play Core Library. To learn more, read Configure conditional delivery.

IntelliJ IDEA 2019.1

The core Android Studio IDE has been updated with improvements from IntelliJ IDEA through the 2019.1 release, such as theme customization.

The last IntelliJ version that was included with Android Studio was 2018.3.4. For more information about the improvements from other IntelliJ versions that are included cumulatively with this release of Android Studio, see the following bug-fix updates:

For information on what’s new in Android Gradle plugin 3.5.0, such as improved support for incremental annotation processing and cacheable unit tests, see its release notes.

Community contributors

Thank you to all of our community contributors who have helped us discover bugs and other ways to improve Android Studio 3.5. In particular, we'd like to thank the following people who reported P0 and P1 bugs:

3.4 (April 2019)

Android Studio 3.4 is a major release that includes a variety of new features and improvements.

IntelliJ IDEA 2018.3.4

The core Android Studio IDE has been updated with improvements from IntelliJ IDEA through the 2018.3.4 release.

Android Gradle plugin 3.4.0 updates

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

New Project Structure Dialog

The new Project Structure Dialog (PSD) makes it easier to update dependencies and configure different aspects of your project, such as modules, build variants, signing configurations, and build variables.

You can open the PSD by selecting File > Project Structure from the menu bar. You can also open the PSD by pressing Ctrl+Shift+Alt+S on Windows and Linux, or Command+; (semicolon) on macOS. You can find descriptions of some of the new and updated sections of the PSD below.

Variables

The new variables section of the PSD allows you to create and manage build variables, such as those to keep version numbers for dependencies consistent across your project.

Quickly view and edit build variables that already exist in your project’s Gradle build scripts.

Add new build variables at a project- or module-level directly from the PSD.

Note: If your existing build configuration files assign values through complex Groovy scripts, you may not be able to edit those values through the PSD. Additionally, you can not edit build files written in Kotlin using the PSD.

Modules

Configure properties that are applied to all build variants in an existing module or add new modules to your project from the Modules section. For example, this is where you can configure defaultConfig properties or manage signing configurations.

Dependencies

Inspect and visualize each dependency in the dependency graph of your project, as resolved by Gradle during project sync, by following these steps:

In the left pane of the PSD, select Dependencies. In the Modules pane, select a module for which you’d like to inspect the resolved dependencies. On the right side of the PSD, open the Resolved Dependencies pane, which is shown below.

You can also quickly search for and add dependencies to your project by first selecting a module from the Dependencies section of the PSD, clicking the (+) button in the Declared Dependencies section, and selecting the type of dependency you want to add.

Depending on the type of dependency you select, you should see a dialog, similar to the one below, that helps you add the dependency to the module.

Build Variants

In this section of the PSD, create and configure build variants and product flavors for each module in your project. You can add manifest placeholders, add ProGuard files, and assign signing keys, and more.

Suggestions

See suggested updates for project dependencies and build variables in the Suggestions section, as shown below.

New Resource Manager

Resource Manager is a new tool window for importing, creating, managing, and using resources in your app. You can open the tool window by selecting View > Tool Windows > Resource Manager from the menu bar. The Resource Manager allows you to do the following:

Visualize resources: You can preview drawables, colors, and layouts to quickly find the resources you need.

You can preview drawables, colors, and layouts to quickly find the resources you need. Bulk import: You can import multiple drawable assets at once by either dragging and dropping them into the Resource Manager tool window or by using the Import drawables wizard. To access the wizard, select the (+) button at the top-left corner of the tool window, and then select Import Drawables from the drop down menu.

You can import multiple drawable assets at once by either dragging and dropping them into the tool window or by using the wizard. To access the wizard, select the (+) button at the top-left corner of the tool window, and then select from the drop down menu. Convert SVGs into VectorDrawable objects: You can use the Import Drawables wizard to convert your SVG images into VectorDrawable objects.

You can use the wizard to convert your SVG images into objects. Drag and drop assets: From the Resource Manager tool window, you can drag and drop drawables onto both the design and XML views of the Layout Editor.

From the tool window, you can drag and drop drawables onto both the design and XML views of the Layout Editor. View alternative versions: You can now view alternative versions of your resources by double-clicking a resource within the Tool window. This view shows the different versions you have created and the qualifiers that were included.

You can now view alternative versions of your resources by double-clicking a resource within the window. This view shows the different versions you have created and the qualifiers that were included. Tile and list views: You can change the view within the tool window to visualize your resources in different arrangements.

To learn more, read the guide about how to Manage app resources.

Checking build IDs when profiling and debugging APKs

When you provide debugging symbol files for the .so shared libraries inside your APK, Android Studio verifies that the build ID of the provided symbol files match the build ID of the .so libraries inside the APK.

If you build the native libraries in your APK with a build ID, Android Studio checks whether the build ID in your symbol files matches the build ID in your native libraries and rejects the symbol files if there is a mismatch. If you did not build with a build ID, then providing incorrect symbol files may cause problems with debugging.

R8 enabled by default

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

The image below provides a high-level overview of the compile process before 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, so you’ll likely not need to take any actions to benefit from R8. However, because it’s a different technology to ProGuard that’s designed specifically for Android projects, shrinking and optimization may result in removing code that ProGuard may have not. So, in this unlikely situation, you might need to add additional rules to keep that code in your build output.

If you experience issues using R8, read the R8 compatibility FAQ to 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’s gradle.properties file:

# Disables R8 for Android Library modules only. android.enableR8.libraries = false # Disables R8 for all modules. android.enableR8 = false

Note: For a given build type, if you set useProguard to false in your app module's build.gradle file, the Android Gradle plugin uses R8 to shrink your app's code for that build type, regardless of whether you disable R8 in your project's gradle.properties file.

Navigation Editor now supports all argument types

All argument types supported by the Navigation component are now supported in the Navigation Editor. For more information on supported types, see Pass data between destinations.

Layout Editor improvements

The Attributes pane in the Layout Editor has been streamlined into a single page with sections you can expand to reveal attributes you can configure. The Attributes pane also includes the following updates:

A new Declared Attributes section lists the attributes the layout file specifies and allows you to quickly add new ones.

section lists the attributes the layout file specifies and allows you to quickly add new ones. The Attributes pane now also features indicators next to each attribute that are solid when the attribute's value is a resource reference and empty otherwise.

pane now also features indicators next to each attribute that are solid when the attribute's value is a resource reference and empty otherwise. Attributes with errors or warnings are now highlighted. Red highlights indicate errors (for example, when you use invalid layout values) and orange highlights indicate warnings (for example, when you use hard-coded values).

New intention action to quickly import dependencies

If you start using certain Jetpack and Firebase classes in your code, a new intention action suggests adding the required Gradle library dependency to your project, if you haven’t already done so. For example, if you reference the WorkManager class without first importing the required android.arch.work:work-runtime dependency, an intention action lets you do so easily in a single click, as shown below.

In particular, because Jetpack repackaged the support library into discrete packages that are easier to manage and update, this intention action helps you quickly add only the dependencies you need for the Jetpack components you want to use.

3.3 (January 2019)

Android Studio 3.3 is a major release that includes a variety of new features and improvements.

IntelliJ IDEA 2018.2.2

The core Android Studio IDE has been updated with improvements from IntelliJ IDEA through the 2018.2.2 release.

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

Navigation Editor

The Navigation Editor lets you quickly visualize and build navigation into your app by using the Navigation Architecture Component.

For more information, see Implement navigation with the Navigation Architecture Component.

Delete unused Android Studio directories

When you run a major version of Android Studio for the first time, it looks for directories containing caches, settings, indices, and logs for versions of Android Studio for which a corresponding installation can’t be found. The Delete Unused Android Studio Directories dialog then displays locations, sizes, and last-modified times of these unused directories and provides an option to delete them.

The directories Android Studio considers for deletion are listed below:

Linux: ~/.AndroidStudio[Preview]_X.Y_

Mac: ~/Library/{Preferences, Caches, Logs, Application Support}/AndroidStudio[Preview]_X.Y_

Windows: %USER%\.AndroidStudio[Preview]_X.Y_

Lint improvements

Lint, when invoked from Gradle, is significantly faster—larger projects can expect lint to run up to four times faster.

Create New Project wizard

The Create New Project wizard has a new look and contains updates that help streamline the creation of new Android Studio projects.

For more information, see Create a project.

Android Studio 3.3 includes updates to several of the individual profilers.

Improved performance

Based on user feedback, rendering performance while using the profilers has been greatly improved. Please continue to provide feedback, especially if you continue to see performance issues.

Profiler memory allocation tracking options

To improve app performance while profiling, the Memory Profiler now samples memory allocations periodically by default. If desired, you can change this behavior by using the Allocation Tracking dropdown when testing on devices running Android 8.0 (API level 26) or higher.

Using the Allocation Tracking dropdown, you can choose from the following modes:

Full: captures all object memory allocations. Note that if you have an app that allocates a lot of objects, you might see significant performance issues while profiling.

captures all object memory allocations. Note that if you have an app that allocates a lot of objects, you might see significant performance issues while profiling. Sampled: captures a periodic sample of object memory allocations. This is the default behavior and has less impact on app performance while profiling. You might encounter some performance issues with apps that allocate a lot of objects within a short time period.

captures a periodic sample of object memory allocations. This is the default behavior and has less impact on app performance while profiling. You might encounter some performance issues with apps that allocate a lot of objects within a short time period. Off: turns memory allocation off. If not already selected, this mode is enabled automatically while taking a CPU recording and then returned to the previous setting when the recording is finished. You can change this behavior in the CPU recording configuration dialog. The tracking affects both Java objects and JNI references.

Inspect frame rendering data

In the CPU Profiler, you can now inspect how long it takes your Java app to render each frame on the main UI thread and RenderThread. This data might be useful when investigating bottlenecks that cause UI jank and low framerates. For example, each frame that takes longer than the 16ms required to maintain a smooth framerate is displayed in red.

To see frame rendering data, record a trace using a configuration that allows you to Trace System Calls. After recording the trace, look for info about each frame along the timeline for the recording under the section called FRAMES, as shown below.

To learn more about investigating and fixing framerate issues, read Slow rendering.

Fragments in the event timeline

The event timeline now shows when fragments are attached and detached. Additionally, when you hover over a fragment, a tooltip shows you the fragment status.

View formatted text for connection payloads in the Network profiler

Previously, the Network profiler displayed only raw text from connection payloads. Android Studio 3.3 now formats certain text types by default, including JSON, XML, and HTML. In the Response and Request tabs, click the View Parsed link to display formatted text, and click the View Source link to display raw text.

For more information, see Inspect network traffic with Network Profiler.

Automatic downloading of SDK components

When your project needs an SDK component from the SDK platforms, NDK, or CMake, Gradle now attempts to automatically download the required packages as long as you’ve previously accepted any related license agreements using the SDK Manager.

For more information, see Auto-download missing packages with Gradle.

Support for Clang-Tidy

Android Studio now includes support for static code analysis using Clang-Tidy for projects that include native code. To enable support for Clang-Tidy, update your NDK to r18 or higher.

You can then enable or re-enable the inspections by opening the Settings or Preferences dialog and navigating to Editor > Inspections > C/C++ > General > Clang-Tidy. When selecting this inspection in the Settings or Preferences dialog, you can also see the list of Clang-Tidy checks that are enabled and disabled under the Option section of the right-most panel. To enable additional checks, add them to the list and click Apply.

To configure Clang-Tidy with additional options, click Configure Clang-Tidy Checks Options and add them in the dialog that opens.

Removal of options for C++ customization

The following options have been removed from the Customize C++ Support dialog:

Exceptions Support (-fexceptions)

Runtime Type Information Support (-ftti)

The respective behaviors are enabled for all projects created through Android Studio.

CMake version 3.10.2

CMake version 3.10.2 is now included with SDK Manager. Note that Gradle still uses version 3.6.0 by default.

To specify a CMake version for Gradle to use, add the following to your module’s build.gradle file:

android { ... externalNativeBuild { cmake { ... version "3.10.2" } } }

For more information on configuring CMake in build.gradle , see Manually configure Gradle.

New “+” syntax to specify minimum CMake versions

When specifying a version of CMake in your main module’s build.gradle file, you can now append a “+” to match the behavior of CMake’s cmake_minimum_required() command.

Caution: Using "+" syntax with other build dependencies is discouraged, as dynamic dependencies can cause unexpected version updates and difficulty resolving version differences.

Android App Bundles now support Instant Apps

Android Studio now lets you build Android App Bundles with full support for Google Play Instant. In other words, you can now build and deploy both installed app and instant experiences from a single Android Studio project and include them in a single Android App Bundle.

If you’re creating a new Android Studio project using the Create New Project dialog, make sure you check the box next to Configure your project > This project will support instant apps. Android Studio then creates a new app project as it normally would, but includes the following properties in your manifest to add Instant app support to your app’s base module:

<manifest ... xmlns:dist="http://schemas.android.com/apk/distribution"> <dist:module dist:instant="true" /> ... </manifest>

You can then create an instant-enabled feature module by selecting File > New > New Module from the menu bar and then selecting Instant Dynamic Feature Module from the Create New Module dialog. Keep in mind, creating this module also instant-enables your app’s base module.

To deploy your app to a local device as an instant experience, edit your run configuration and check the box next to General > Deploy as instant app.

Single-variant project sync

Syncing your project with your build configuration is an important step in letting Android Studio understand how your project is structured. However, this process can be time-consuming for large projects. If your project uses multiple build variants, you can now optimize project syncs by limiting them to only the variant you have currently selected.

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

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

Note: This optimization currently supports projects that include only the Java programming language. If, for example, the IDE detects Kotlin or C++ code in your project, it does not automatically enable this optimization, and you should not enable it manually.

For more information, see Enable single-variant project sync.

Provide quick feedback

If you've opted into sharing usage statistics to help improve Android Studio, you'll see these two new icons in the status bar at the bottom of the IDE window:

Simply click the icon that best represents your current experience with the IDE. When you do so, the IDE sends usage statistics that allow the Android Studio team to better understand your sentiment. In some cases, such as when you indicate a negative experience with the IDE, you'll have an opportunity to provide additional feedback.

If you haven't already done so, you can enable sharing usage statistics by opening the Settings dialog (Preferences on a Mac), navigating to Appearance & Behavior > System Settings > Data Sharing, and checking Send usage statistics to Google.

3.2 (September 2018)

Android Studio 3.2 is a major release that includes a variety of new features and improvements.

What's New Assistant

A new assistant informs you about the latest changes in Android Studio.

The assistant opens when you start Android Studio after a fresh installation or update if it detects that there is new information to show. You can also open the assistant by choosing Help > What's new in Android Studio.

Android Jetpack

Android Jetpack helps to accelerate Android development with components, tools, and guidance that eliminate repetitive tasks and enable you to more quickly and easily build high-quality, testable apps. Android Studio includes the following updates to support Jetpack. For more information, see the Jetpack documentation.

Navigation Editor

The new Navigation Editor integrates with the navigation components of Android Jetpack to provide a graphical view for creating the navigation structure of your app. The Navigation Editor simplifies the design and implementation of navigation between in-app destinations.

In Android Studio 3.2, the Navigation Editor is an experimental feature. To enable the Navigation Editor, click File > Settings (Android Studio > Preferences on Mac), select the Experimental category in the left pane, check the box next to Enable Navigation Editor, and restart Android Studio.

To learn more, read the Navigation Editor documentation.

AndroidX migration

As part of Jetpack, we are migrating the Android Support Libraries to a new Android extension library using the androidx namespace. For more information, see the AndroidX overview.

Android Studio 3.2 helps you through this process with a new migration feature.

To migrate an existing project to AndroidX, choose Refactor > Migrate to AndroidX. If you have any Maven dependencies that have not migrated to the AndroidX namespace, the Android Studio build system also automatically converts those project dependencies.

The Android Gradle plugin provides the following global flags that you can set in your gradle.properties file:

android.useAndroidX : When set to true , this flag indicates that you want to start using AndroidX from now on. If the flag is absent, Android Studio behaves as if the flag were set to false .

: When set to , this flag indicates that you want to start using AndroidX from now on. If the flag is absent, Android Studio behaves as if the flag were set to . android.enableJetifier : When set to true , this flag indicates that you want to have tool support (from the Android Gradle plugin) to automatically convert existing third-party libraries as if they were written for AndroidX. If the flag is absent, Android Studio behaves as if the flag were set to false .

Both flags are set to true when you use the Migrate to AndroidX command.

If you want to start using AndroidX libraries immediately and don't need to convert existing third-party libraries, you can set the android.useAndroidX flag to true and the android.enableJetifier flag to false .

Android App Bundle

Android App Bundle is a new upload format that includes all of your app’s compiled code and resources, but defers APK generation and signing to the Google Play Store.

Google Play’s new app serving model then uses your app bundle to generate and serve optimized APKs for each user’s device configuration, so each user downloads only the code and resources they need to run your app. You no longer need to build, sign, and manage multiple APKs, and users get smaller, more optimized downloads.

Additionally, you can add feature modules to your app project and include them in your app bundle. Your users can then download and install your app’s features on demand.

To build a bundle, choose Build > Build Bundle(s) / APK(s) > Build Bundle(s).

For more information, including instructions for building and analyzing an Android App Bundle, see Android App Bundle.

Sample data in Layout Editor

Many Android layouts have runtime data that can make it difficult to visualize the look and feel of a layout during the design stage of app development. You can now easily see a preview of your view in the Layout Editor filled with sample data. When you add a view, a button appears below the view in the Design window. Click this button to set the design-time view attributes. You can choose from a variety of sample data templates and specify the number of sample items with which to populate the view.

To try using sample data, add a RecyclerView to a new layout, click the design-time attributes button below the view, and choose a selection from the carousel of sample data templates.

Slices

Slices provide a new way to embed portions of your app's functionality in other user interface surfaces on Android. For example, Slices make it possible to show app functionality and content in Google Search suggestions.

Android Studio 3.2 has a built-in template to help you to extend your app with the new Slice Provider APIs, as well as new lint checks to ensure that you're following best practices when constructing the Slices.

To get started right-click a project folder and choose New > Other > Slice Provider.

To learn more, including how to test your Slice interactions, read the Slices getting started guide.

Android Studio 3.2 bundles Kotlin 1.2.61, and the new Android SDK integrates better with Kotlin. For more information, see the Android Developers blog.

The core Android Studio IDE has been updated with improvements from IntelliJ IDEA through the 2018.1.6 release.

Android profilers

Try the following new Android Profiler features in Android Studio 3.2.

Sessions

You can now save Profiler data as sessions to revisit and inspect later. The profiler keeps your session data until you restart the IDE.

When you record a method trace or capture a heap dump, the IDE adds that data (along with your app's network activity) as a separate entry to the current session, and you can easily switch back and forth between recordings to compare data.

System Trace

In the CPU Profiler, select the new System Trace configuration to inspect your device's system CPU and thread activity. This trace configuration is built on systrace and is useful for investigating system-level issues, such as UI jank.

While using this trace configuration, you can visually mark important code routines in the profiler timeline by instrumenting your C/C++ code with the native tracing API or your Java code with the Trace class.

Inspect JNI references in the Memory Profiler

If you deploy your app to a device running Android 8.0 (API level 26) or higher, you can now inspect memory allocations for your app’s JNI code using the Memory Profiler.

While your app is running, select a portion of the timeline that you want to inspect and select JNI heap from the drop-down menu above the class list, as shown below. You can then inspect objects in the heap as you normally would and double-click objects in the Allocation Call Stack tab to see where the JNI references are allocated and released in your code.

Import, export, and inspect memory heap dump files

You can now import, export, and inspect .hprof memory heap dump files created with the Memory Profiler.

Import your .hprof file by clicking Start new profiler session in the profiler’s Sessions pane and then selecting Load from file. You can then inspect its data in the Memory Profiler as you would any other heap dump.

To save heap dump data to review later, use the Export Heap Dump button at the right of the Heap Dump entry in the Sessions pane. In the Export As dialog that appears, save the file with the .hprof filename extension.

Record CPU activity during app startup

You can now record CPU activity during your app's startup, as follows:

Select Run > Edit Configurations from the main menu. Under the Profiling tab of your desired run configuration, check the box next to Start recording a method trace on startup. Select a CPU recording configuration to use from the dropdown menu. Deploy your app to a device running Android 8.0 (API level 26) or higher by selecting Run > Profile.

Export CPU traces

After you record CPU activity with the CPU Profiler, you can export the data as a .trace file to share with others or inspect later.

To export a trace after you’ve recorded CPU activity, do the following:

Right-click on the recording you want to export from the CPU timeline. Select Export trace from the dropdown menu. Navigate to where you want to save the file and click Save.

Import and inspect CPU trace files

You can now import and inspect .trace files created with the Debug API or CPU Profiler. (Currently, you can't import System Trace recordings.)

Import your trace file by clicking Start new profiler session in the profiler’s Sessions pane and then selecting Load from file. You can then inspect its data in the CPU Profiler similar to how you normally would, with the following exceptions:

CPU activity is not represented along the CPU timeline.

The thread activity timeline indicates only where trace data is available for each thread and not actual thread states (such as running, waiting, or sleeping).

Record CPU activity using the Debug API

You can now start and stop recording CPU activity in the CPU Profiler by instrumenting your app with the Debug API. After you deploy your app to a device, the profiler automatically starts recording CPU activity when your app calls startMethodTracing(String tracePath) , and the profiler stops recording when your app calls stopMethodTracing() . While recording CPU activity that’s triggered using this API, the CPU Profiler shows Debug API as the selected CPU recording configuration.

Energy Profiler

The Energy Profiler displays a visualization of the estimated energy usage of your app, as well as system events that affect energy usage, such as wakelocks, alarms, and jobs.

The Energy Profiler appears as a new row at the bottom of the Profiler window when you run your app on a connected device or Android Emulator running Android 8.0 (API 26) or higher.

Click the Energy row to maximize the Energy Profiler view. Place your mouse pointer over a bar in the timeline to see a breakdown of energy use by CPU, network, and location (GPS) resources, as well as relevant system events.

System events that affect energy usage are indicated in the System timeline below the Energy timeline. Details of system events within the specified time range are shown in the event pane when you select a time range in the Energy timeline.

To see the call stack and other details for a system event, such as a wakelock, select it in the event pane. To go to the code responsible for a system event, double-click the entry in the call stack.

Lint checking

Android Studio 3.2 includes many new and improved features for lint checking.

The new lint checks help you to find and identify common code problems, ranging from warnings about potential usability issues to high-priority errors regarding potential security vulnerabilities.

Lint checks for Java/Kotlin interoperability

To make sure that your Java code interoperates well with your Kotlin code, new lint checks enforce the best practices described in the Kotlin Interop Guide. Examples of these checks include looking for the presence of Nullability annotations, use of Kotlin hard keywords, and placing lambda parameters last.

To enable these checks, click File > Settings (Android Studio > Preferences on Mac) to open the Settings dialog, navigate to the Editor > Inspections > Android > Lint > Interoperability > Kotlin Interoperability section, and select the rules that you want to enable.

To enable these checks for command-line builds, add the following to your build.gradle file:

android { lintOptions { check 'Interoperability' } }

Lint checks for Slices

New lint checks for Slices help to ensure that you are constructing Slices correctly. For example, lint checks warn you if you have not assigned a primary action to a Slice.

New Gradle target

Use the new lintFix Gradle task to apply all of the safe fixes suggested by the lint check directly to the source code. An example of a lint check that suggests a safe fix to apply is SyntheticAccessor .

Metadata updates

Various metadata, such as the service cast check, have been updated for lint checks to work with Android 9 (API level 28).

Warning if running lint on a new variant

Lint now records which variant and version a baseline is recorded with, and lint warns you if you run it on a different variant than the one with which the baseline was created.

Improvements to existing lint checks

Android Studio 3.2 includes many improvements to existing lint checks. For example, the resource cycle checks now apply to additional resource types, and the translation detector can find missing translations on the fly, in the editor.

Issue IDs more discoverable

Issue IDs are now shown in more places now, including in the Inspection Results window. This makes it easier for you to find the information that you need to enable or disable specific checks through lintOptions in build.gradle .

For more information, see Configure lint options with Gradle.

Data Binding V2

Data Binding V2 is now enabled by default and is compatible with V1. This means that, if you have library dependencies that you compiled with V1, you can use them with projects using Data Binding V2. However, note that projects using V1 cannot consume dependencies that were compiled with V2.

D8 desugaring

In Android Studio 3.1, we integrated the desugaring step into the D8 tool as an experimental feature, reducing overall build time. In Android Studio 3.2, desugaring with D8 is turned on by default.

New code shrinker

R8 is a new tool for code shrinking and obfuscation that replaces ProGuard. You can start using the preview version of R8 by including the following in your project’s gradle.properties file:

android.enableR8 = true

Changed default ABIs for multi-APKs

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

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

splits { abi { include 'armeabi', 'mips', 'mips64' ... } }

Note: This behavior change is also included in Android Studio 3.1 RC1 and higher.

Improved editor features for CMake build files

If you use CMake to add C and C++ code to your project, Android Studio now includes improved editor features to help you to edit your CMake build scripts, such as the following:

Syntax highlighting and code completion: The IDE now highlights and suggests code completion for common CMake commands. Additionally, you can navigate to a file by clicking it while pressing the Control key (Command on Mac).

The IDE now highlights and suggests code completion for common CMake commands. Additionally, you can navigate to a file by clicking it while pressing the Control key (Command on Mac). Code reformatting: You can now use IntelliJ’s code reformat option to apply code styles to your CMake build scripts.

You can now use IntelliJ’s code reformat option to apply code styles to your CMake build scripts. Safe refactoring: The IDE’s built-in refactoring tools now also check if you are renaming or deleting files that you reference in your CMake build scripts.

Navigate external header files

When using the Project window in previous versions of Android Studio, you could navigate and inspect only the header files that belong to libraries you build from a local project. With this release, you can now also view and inspect header files included with external C/C++ library dependencies that you import into your app project.

If you already include C/C++ code and libraries in your project, open the Project window on the left side of the IDE by selecting View > Tool Windows > Project from the main menu and select Android from the drop-down menu. In the cpp directory, all headers that are within the scope of your app project are organized under the include node for each of your local C/C++ library dependencies, as shown below.

Native multidex enabled by default

Previous versions of Android Studio enabled native multidex when deploying the debug version of an app to a device running Android API level 21 or higher. Now, whether you’re deploying to a device or building an APK for release, the Android plugin for Gradle enables native multidex for all modules that set minSdkVersion=21 or higher.

AAPT2 moved to Google's Maven repository

Beginning with Android Studio 3.2, the source for AAPT2 (Android Asset Packaging Tool 2) is Google's Maven repository.

To use AAPT2, make sure that you have a google() dependency in your build.gradle file, as shown here:

buildscript { repositories { google() // here jcenter() } dependencies { classpath 'com.android.tools.build:gradle:3.2.0' } } allprojects { repositories { google() // and here jcenter() }

The new version of AAPT2 fixes many issues, including improved handling of non-ASCII characters on Windows.

Removal of configuration on demand

The Configure on demand preference has been removed from Android Studio.

Android Studio no longer passes the --configure-on-demand argument to Gradle.

ADB Connection Assistant

The new ADB Connection Assistant provides step-by-step instructions to help you set up and use a device over the Android Debug Bridge (ADB) connection.

To start the assistant, choose Tools > Connection Assistant.

The ADB Connection Assistant provides instructions, in-context controls, and a list of connected devices in a series of pages in the Assistant panel.

Emulator improvements

You can now save and load snapshots of an AVD (Android virtual device) at any time in the Android Emulator, making it fast and easy to return an emulated device to a known state for testing. When you edit an AVD using the AVD Manager, you can specify which AVD snapshot to load when the AVD starts.

Controls for saving, loading, and managing AVD snapshots are now in the Snapshots tab in the emulator's Extended controls window.

For details, see Snapshots.

For additional information on what’s new and changed in the Emulator, see the Emulator release notes.

3.1 (March 2018)

Android Studio 3.1.0 is a major release that includes a variety of new features and improvements.

Coding/IDE

IntelliJ 2017.3.3

The core Android Studio IDE has been updated with improvements from IntelliJ IDEA through the 2017.3.3 release. Improvements include better control flow analysis for collections and strings, improved nullability inference, new quick fixes, and much more.

For details, see the JetBrains release notes for IntelliJ IDEA versions 2017.2 and 2017.3, as well as the JetBrains release notes for bug-fix updates.

SQL editing improvements with Room

When you use the Room database library, you can take advantage of several improvements to SQL editing:

Code completion within a Query understands SQL tables (entities), columns, query parameters, aliases, joins, subqueries, and WITH clauses.

understands SQL tables (entities), columns, query parameters, aliases, joins, subqueries, and WITH clauses. SQL syntax highlighting now works.

You can right-click a table name in SQL and rename it, which also rewrites the corresponding Java or Kotlin code (including, for example, the return type of the query). Renaming works in the other direction, too, so renaming a Java class or field rewrites the corresponding SQL code.

SQL usages are shown when using Find usages (right-click and choose Find usages from the context menu).

(right-click and choose from the context menu). To navigate to an SQL entity's declaration in Java or Kotlin code, you can hold Control (Command on Mac) while clicking the entity.

For information on using SQL with Room, see Save data in a local database using Room.

This update includes several improvements for data binding:

You can now use a LiveData object as an observable field in data binding expressions. The ViewDataBinding class now includes a new setLifecycle() method that you use to observe LiveData objects.

The ObservableField class can now accept other Observable objects in its constructor.

You can preview a new incremental compiler for your data binding classes. For details of this new compiler and instructions for enabling it, see Data Binding Compiler V2. Benefits of the new compiler include the following: ViewBinding classes are generated by the Android Plugin for Gradle before the Java compiler. Libraries keep their generated binding classes when the app is compiled, rather than being regenerated each time. This can greatly improve performance for multi-module projects.



Compiler and Gradle

D8 is the default DEX compiler

The D8 compiler is now used by default for generating DEX bytecode.

This new DEX compiler brings with it several benefits, including the following:

Faster dexing

Lower memory usage

Improved code generation (better register allocation, smarter string tables)

Better debugging experience when stepping through code

You don't need to make any changes to your code or your development workflow to get these benefits, unless you had previously manually disabled the D8 compiler. If you set android.enableD8 to false in your gradle.properties , either delete that flag or set it to true :

android.enableD8=true

For details, see New DEX compiler.

Incremental desugaring

For projects that use Java 8 language features, incremental desugaring is enabled by default, which can improve build times.

Desugaring converts syntactic sugar into a form that the compiler can process more efficiently.

You can disable incremental desugaring by specifying the following in your project's gradle.properties file:

android.enableIncrementalDesugaring=false

Simplified output window

The Gradle Console has been replaced with the Build window, which has Sync and Build tabs.

For details about how to use the new, simplified Build window, see Monitor the build process.

The Gradle sync and IDE indexing processes are now much more efficient, reducing time wasted on many redundant indexing operations.

C++ and LLDB

We have made many quality and performance improvements in the coding, syncing, building, and debugging phases of C++ development. Improvements include the following:

If you work with large C++ projects, you should notice a significant improvement in the reduction of time spent building symbols. Sync time is also greatly reduced for large projects.

Performance when building and syncing with CMake has been improved through more aggressive reuse of cached results.

The addition of formatters ("pretty printers") for more C++ data structures makes LLDB output easier to read.

LLDB now works with only Android 4.1 (API level 16) and higher.

Note: Native debugging with Android Studio 3.0 or greater does not work on 32-bit Windows. If you are using 32-bit Windows and need to debug native code, use Android Studio 2.3.

Kotlin

Kotlin upgraded to version 1.2.30

Android Studio 3.1 includes Kotlin version 1.2.30.

Kotlin code now analyzed with command-line lint check

Running lint from the command line now analyzes your Kotlin classes.

For each project that you would like to run lint on, Google's Maven repository must be included in the top-level build.gradle file. The Maven repository is already included for projects created in Android Studio 3.0 and higher.

Sample native C++ processes with CPU Profiler

The CPU Profiler now includes a default configuration to record sampled traces of your app's native threads. You can use this configuration by deploying your app to a device running Android 8.0 (API level 26) or higher and then selecting Sampled (Native) from the CPU Profiler's recording configurations dropdown menu. After that, record and inspect a trace as you normally would.

You can change default settings, such as the sampling interval, by creating a recording configuration.

To switch back to tracing your Java threads, select either a Sampled (Java) or Instrumented (Java) configuration.

Filter CPU traces, memory allocation results, and heap dumps

The CPU Profiler and Memory Profiler include a search feature that allows you to filter results from recording a method trace, memory allocations, or heap dump.

To search, click Filter in the top-right corner of the pane, type your query, and press Enter.

Tip: You can also open the search field by pressing Control + F (Command + F on Mac).

In the CPU Profiler's Flame Chart tab, call stacks that include methods related to your search query are highlighted and moved to the left side of the chart.

For more information on filtering by method, class, or package name, see Record and inspect method traces.

Request tab in the Network Profiler

The Network Profiler now includes a Request tab that provides details about network requests during the selected timeline. In previous versions, the Network Profiler only provided information about network responses.

Thread View in the Network Profiler

After selecting a portion of the timeline in the Network Profiler, you can select one of the following tabs to see more detail about the network activity during that timeframe:

Connection View : Provides the same information as previous versions of Android Studio—it lists files that were sent or received during the selected portion of the timeline across all of your app's CPU threads. For each request, you can inspect the size, type, status, and transmission duration.

: Provides the same information as previous versions of Android Studio—it lists files that were sent or received during the selected portion of the timeline across all of your app's CPU threads. For each request, you can inspect the size, type, status, and transmission duration. Thread View: Displays network activity of each of your app's CPU threads. This view allows you to inspect which of your app's threads are responsible for each network request.

Layout Inspector

The Layout Inspector gained new features, including some functionality previously provided by the deprecated Hierarchy Viewer and Pixel Perfect tools:

Zoom buttons and keyboard shortcuts for navigating and inspecting layouts

Reference grid overlay

Ability to load a reference image and use it as an overlay (useful for comparing your layout with a UI mockup)

Render subtree preview to isolate a view in a complex layout

Layout Editor

The Palette in the Layout Editor has received many improvements:

Reorganization of categories for views and layouts.

New Common category for views and layouts, which you can add to with a Favorite command.

category for views and layouts, which you can add to with a command. Improved search for views and layouts.

New commands for opening documentation for a specific view or layout element.

You can use the new Convert view command in the Component tree or design editor to convert a view or layout to another type of view or layout.

You can now easily create constraints to items near the selected view using the new Create a connection buttons in the view inspector at the top of the Attributes window.

Run and Instant Run

The behavior of the Use same selection for future launches option in the Select deployment target dialog has been made more consistent. If the Use same selection option is enabled, then the Select deployment target dialog opens only the first time that you use the Run command until the selected device is no longer connected.

When targeting a device running Android 8.0 (API level 26) or higher, Instant Run can deploy changes to resources without causing an application restart. This is possible because the resources are contained in a split APK.

Emulator

For details of what's new and changed in the emulator since Android Studio 3.0, see the Android Emulator release notes from version 27.0.2 through version 27.1.12.

Major improvements include the following:

Quick Boot snapshots for saving of emulator state and faster start, with the ability to use the Save now command to save a custom start state.

command to save a custom start state. Windowless emulator screen.

System images for Android 8.0 (API level 26), Android 8.1 (API level 27), and Android P Developer Preview.

User interface and user experience improvements

More tooltips, keyboard shortcuts, and helpful messages

We have added tooltips and helpful message overlays in many places throughout Android Studio.

To see keyboard shortcuts for many commands, just hold the mouse pointer over a button until the tooltip appears.

The Tools > Android menu has been removed. Commands that were previously under this menu have been moved.

Many commands moved to directly under the Tools menu.

menu. The Sync project with gradle files command moved to the File menu.

command moved to the menu. The Device Monitor command has been removed, as described below.

Device Monitor available from the command line

In Android Studio 3.1, the Device Monitor serves less of a role than it previously did. In many cases, the functionality available through the Device Monitor is now provided by new and improved tools.

See the Device Monitor documentation for instructions for invoking the Device Monitor from the command line and for details of the tools available through the Device Monitor.

3.0 (October 2017)

Android Studio 3.0.0 is a major release that includes a variety of new features and improvements.

macOS users: If you are updating an older version of Android Studio, you may encounter an update error dialog that says "Some conflicts were found in the installation area". Simply ignore this error and click Cancel to resume the installation.

Android Plugin for Gradle 3.0.0

The new Android plugin for Gradle includes a variety of improvements and new features, but it primarily improves build performance for projects that have a large number of modules. When using the new plugin with these large projects, you should experience the following:

Faster build configuration times due to new delayed dependency resolution.

Variant-aware dependency resolution for only the projects and variants you are building.

Faster incremental build times when applying simple changes to code or resources.

Note: These improvements required significant changes that break some of the plugin's behaviors, DSL, and APIs. Upgrading to version 3.0.0 might require changes to your build files and Gradle plugins.

This version also includes the following:

Support for Android 8.0.

Support for building separate APKs based on language resources.

Support for Java 8 libraries and Java 8 language features (without the Jack compiler).

Support for Android Test Support Library 1.0 (Android Test Utility and Android Test Orchestrator).

Improved ndk-build and cmake build speeds.

Improved Gradle sync speed.

AAPT2 is now enabled by default.

Using ndkCompile is now more restricted. You should instead migrate to using either CMake or ndk-build to compile native code that you want to package into your APK. To learn more, read Migrate from ndkcompile.

For more information about what's changed, see the Android Plugin for Gradle release notes.

If you're ready to upgrade to the new plugin, see Migrate to Android Plugin for Gradle 3.0.0.

Kotlin support

As announced at Google I/O 2017, the Kotlin programming language is now officially supported on Android. So with this release, Android Studio includes Kotlin language support for Android development.

You can incorporate Kotlin into your project by converting a Java file to Kotlin (click Code > Convert Java File to Kotlin File) or by creating a new Kotlin- enabled project using the New Project wizard.

To get started, read how to add Kotlin to your project.

Java 8 language features support

You can now use certain Java 8 language features and consume libraries built with Java 8. Jack is no longer required, and you should first disable Jack to use the improved Java 8 support built into the default toolchain.

To update your project to support the new Java 8 language toolchain, update the Source Compatibility and Target Compatibility to 1.8 in the Project Structure dialog (click File > Project Structure). To learn more, read how to use Java 8 language features.

Android Profiler

The new Android Profiler replaces the Android Monitor tool and provides a new suite of tools to measure your app's CPU, memory, and network usage in realtime. You can perform sample-based method tracing to time your code execution, capture heap dumps, view memory allocations, and inspect the details of network-transmitted files.

To open, click View > Tool Windows > Android Profiler (or click Android Profiler in the toolbar).

The event timeline at the top of the window shows touch events, key presses, and activity changes so you have more context to understand other performance events in the timeline.

Note: The Logcat view also moved to a separate window (it was previously inside Android Monitor, which was removed).

From the Android Profiler's overview timeline, click on the CPU, MEMORY, or NETWORK timelines to access the corresponding profiler tools.

CPU Profiler

The CPU Profiler helps you analyze the CPU thread usage of your app by triggering a sample or instrumented CPU trace. Then, you can troubleshoot CPU performance issues using a variety of data views and filters.

For more information, see the CPU Profiler guide.

Memory Profiler

The Memory Profiler helps you identify memory leaks and memory churn that can lead to stutter, freezes, and even app crashes. It shows a realtime graph of your app's memory use, lets you capture a heap dump, force garbage collections, and track memory allocations.

For more information, see the Memory Profiler guide.

Network Profiler

The Network Profiler allows you to monitor the network activity of your app, inspect the payload of each of your network requests, and link back to the code that generated the network request.

For more information, see the Network Profiler guide.

APK profiling and debugging

Android Studio now allows you to profile and debug any APK without having to build it from an Android Studio project—as long as the APK is built to enable debugging and you have access to the debug symbols and source files.

To get started, click Profile or debug APK from the Android Studio Welcome screen. Or, if you already have a project open, click File > Profile or debug APK from the menu bar. This displays the unpacked APK files, but it does not decompile the code. So, to properly add breakpoints and view stack traces, you need to attach Java source files and native debug symbols.

For more information, see Profile and Debug Pre-built APKs.

Device File Explorer

The new Device File Explorer allows you to inspect your connected device's filesystem, and transfer files between the device and your computer. This replaces the filesystem tool available in DDMS.

To open, click View > Tool Windows > Device File Explorer.

For more information, see the Device File Explorer guide.

Instant Apps support

New support for Android Instant Apps allows you to create Instant Apps in your project using two new module types: Instant App modules and Feature modules (these require that you install the Instant Apps Development SDK).

Android Studio also includes a new modularize refactoring action to help you add support for Instant Apps in an existing project. For example, if you want to refactor your project to place some classes in an Instant App feature module, select the classes in the Project window and click Refactor > Modularize. In the dialog that appears, select the module where the classes should go and click OK.

And when you're ready to test your Instant App, you can build and run your Instant App module on a connected device by specifying the Instant App's URL within the run configuration launch options: Select Run > Edit Configurations, select your Instant App module, and then set the URL under Launch Options.

For more information, see Android Instant Apps.

Android Things modules

New Android Things templates in the New Project and New Module wizards to help you start developing for Android-powered IOT devices.

For more information, see how to create an Android Things project.

Adaptive Icons wizard

Image Asset Studio now supports vector drawables and allows you to create adaptive launcher icons for Android 8.0 while simultaneously creating traditional icons ("Legacy" icons) for older devices.

To start, right-click on the res folder in your project, and then click New > Image Asset. In the Asset Studio window, select Launcher Icons (Adaptive and Legacy) as the icon type.

Note: You must set compileSdkVersion to 26 or higher to use adaptive launcher icons.

For more information, read about Adaptive Icons.

Support for font resources

To support the new font resources in Android 8.0, Android Studio includes a font resources selector to help bundle fonts into your app or configure your project to download the fonts on the device (when available). The layout editor can also preview the fonts in your layout.

To try downloadable fonts, ensure that your device or emulator is running Google Play Services v11.2.63 or higher. For more information, read about Downloadable Fonts.

Firebase App Indexing Assistant

The Firebase Assistant has been updated with a new tutorial to test App Indexing. To open the Assistant, select Tools > Firebase. Then select App Indexing > Test App Indexing.

The tutorial includes new buttons to test your public and personal content indexing:

In step 2, click Preview search results to verify that your URLs are showing up in Google Search results.

to verify that your URLs are showing up in Google Search results. In step 3, click Check for errors to verify that the indexable objects in your app have been added to the personal content index.

The App Links Assistant has been updated with the following new capabilities:

Add URL tests for each URL mapping to be sure your intent filters handle real-world URLs. You can also define these URL tests by hand using the <tools:validation> tag described below.

Create a Digital Asset Links file with the appropriate object entry to support Google Smart Lock, and add the corresponding asset_statements <meta-data> tag to your manifest file.

URL intent-filter validator

Android Studio now supports a special tag in the manifest file that allows you to test your intent filter URLs. These are the same tags that the App Links Assistant can create for you.

To declare a test URL for an intent filter, add a <tools:validation> element alongside the corresponding <intent-filter> element. For example:

<activity ...> <intent-filter> ... </intent-filter> <tools:validation testUrl="https://www.example.com/recipe/1138" /> </activity>

Be sure to also include xmlns:tools="http://schemas.android.com/tools" in the <manifest> tag.

If any one of the test URLs does not pass the intent filter definition, a lint error appears. Such an error still allows you to build debug variants, but it will break your release builds.

Layout Editor

The Layout Editor has been updated with a number of enhancements, including the following:

New toolbar layout and icons.

Updated layout in the component tree.

Improved drag-and-drop view insertions.

New error panel below the editor, showing all issues with suggestions to fix (if available).

Various UI enhancements for building with ConstraintLayout , including the following: New support to create barriers. New support to create groups: In the toolbar, select Guidelines > Add Group (requires ConstraintLayout 1.1.0 beta 2 or higher) New UI to create chains: Select multiple views, and then right-click and select Chain .

, including the following:

Layout Inspector

The Layout Inspector includes enhancements to make it easier to debug issues with your app layouts, including grouping properties into common categories and new search functionality in both the View Tree and the Properties panes.

APK Analyzer

You can now use the APK Analyzer from the command line with the apkanalyzer tool.

The APK Analyzer has also been updated with the following improvements:

For APKs built with ProGuard, you can load ProGuard mapping files that add capabilities to the DEX viewer, including: Bolded nodes to indicate that the nodes should not be removed when shrinking code. A button to show nodes that were removed during the shrinking process. A button that restores the original names of nodes in the tree view that were obfuscated by ProGuard.

The DEX Viewer now shows the estimated size impact of each package, class and method.

New filtering options at the top to show and hide fields and methods.

In the tree view, nodes that are references not defined in the DEX file appear in italics.

For more information, see Analyze Your Build with APK Analyzer.

Preview for D8 DEX compiler

Android Studio 3.0 includes an optional new DEX compiler called D8. It will eventually replace the DX compiler, but you can opt-in to use the new D8 compiler now.

DEX compilation directly impacts your app's build tim