Android Studio Chipmunk | 2021.2.1

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

This page lists new features and improvements in the latest version in the stable channel, Android Studio Chipmunk. You can download it here or update to it inside Android Studio by clicking Help > Check for updates (Android Studio > Check for updates on macOS)

To view the release notes for older versions of Android Studio, see Past releases.

For early access to upcoming features and improvements, see the Preview builds of Android Studio.

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

Support for creating your app with Jetpack Compose

Animation Preview supports animatedVisibility

Android Studio Chipmunk supports the animatedVisibility API in Animation Preview. To use Animation preview with animatedVisibility, use Compose version 1.1.0 or higher. To learn more about Animation Preview, see Animations.

Support for deploying preview from Library Modules

Previews allow you to view your UI within Android Studio without having to run your app on a physical device. In Android Studio Chipmunk, you can deploy a specific @Preview to an emulator or physical device from Library Modules. To learn more, see Deploy Preview.

Support for profiling your app

Detect jank on Android 12 and higher

For devices using Android 12 or higher, a captured trace is shown in the Janky frames track under the Display pane in the CPU Profiler.

To detect jank,

  1. From the development emulator or device, start the app.
  2. In Android Studio, select View > Tool Windows > Profiler or click Profile in the toolbar.

    If prompted by the Select Deployment Target dialog, choose the device to which to deploy your app for profiling. If you've connected a device over USB but don't see it listed, ensure that you have enabled USB debugging.

  3. Click anywhere in the CPU timeline to open the CPU Profiler.

  4. You should see the Janky frames track under Display. By default, the Profiler only shows janky frames as candidates for investigation. Within each janky frame, the red portion highlights the duration the frame takes past its rendering deadline. Screenshot of the Janky frames track

  5. Once you find a janky frame, click on it; optionally, you can press M to adjust the zoom to focus on the selected frame. The relevant events will be highlighted in the main threads: RenderThread and GPU completion. Screenshot of Profiler displaying Janky frames and main threads

  6. You can optionally see all frames or a breakdown of the rendering time by toggling the checkboxes All Frames and Lifecycle, respectively. Screenshot of Profiler as above but with All Frames and Lifecycle checkboxes checked

For more information, see UI jank detection.

Android Gradle plugin and Android Studio compatibility

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

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

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

Patch releases

The following is list of patch releases in Android Studio Chipmunk.

Android Studio Chipmunk | 2021.2.1 Patch 2 (August 2022)

This minor update includes the following update and bug fixes:

Android platform support

With Android Studio Chipmunk Patch 2 and Android Gradle 7.2.2, you can compile against Android 13 APIs by setting compileSdk=33. The highest supported minimum SDK version is 32. minSdk = 33 is not supported until Android Gradle plugin 7.3.0-beta05.

Fixed Issues
C++ Debugger
Release version of a native library from a dependent project gets packaged even for a debug build variant
Design Tools
Ctrl + D or “show diff” button doesn't show git diff
Dexer (D8)
Document the compiler version required for each desugared library version
Lint UnusedResources False Positive with Import Alias
Build problem with multiple product flavours in new version
Shrinker (R8)
ArrayIndexOutOfBoundsException in IntSwitch
R8 3.1.7-dev and above improperly optimizes Enums, leading to NoSuchFieldError
R8 causing VerifyError on Scala libraries
Gradle 7.2.0 causing APK build error
NPE in shrinker, R8 version 3.2.60
[R8 3.3.57] NoClassDefFound due to interface replaced with abstract class with higher SDK requirements
NullPointerException in FieldAssignmentTracker using 3.3.35

Android Studio Chipmunk | 2021.2.1 Patch 1 (May 2022)

This minor update includes the following bug fixes:

Fixed Issues
Dexer (D8)
Art / Dalvik VMs prior to version 8 does not support the fix for JDK-8272564
File watcher failed to start on Ubuntu 20.04
MBP 15" 2018 Touch Bar menu is missed.
Devices option is not visible and unable to run the app even though app module is available.
Shrinker (R8)
Why does R8 doesn't backport default interface methods but D8 does?
CIRCULAR REFERENCE: Unexpected type in conversion to primitive: OBJECT