New features in Android Studio Preview

This page lists the new features introduced in Android Studio preview releases. The preview builds provide early access to the latest features and improvements in Android Studio. You can download these preview versions here. If you encounter any problems using a preview version of Android Studio, please let us know. Your bug reports help to make Android Studio better.

For the latest news on Android Studio preview releases, including a list of notable fixes in each preview release, see the Release Updates in the Android Studio blog.

Current versions of Android Studio

The following table lists the current versions of Android Studio and their respective channels.

Version Channel
Android Studio Koala Feature Drop | 2024.1.2 Stable
Android Gradle plugin 8.6.0 Stable
Android Studio Ladybug | 2024.2.1 Beta
Android Studio Ladybug Feature Drop | 2024.2.2 Canary

Compatibility with Android Gradle plugin previews

Each preview version of Android Studio is published alongside a corresponding version of the Android Gradle plugin (AGP). Preview versions of Studio should work with any compatible stable version of AGP. However, if you're using a preview version of AGP, you must use the corresponding preview version of Studio (for example, Android Studio Chipmunk Canary 7 with AGP 7.2.0-alpha07). Attempts to use divergent versions (for example, Android Studio Chipmunk Beta 1 with AGP 7.2.0-alpha07) will cause a Sync failure, which results in a prompt to update to the corresponding version of AGP.

For a detailed log of Android Gradle plugin API deprecations and removals, see the Android Gradle plugin API updates.

Android Studio Ladybug | 2024.2.1

The following are new features in Android Studio Ladybug | 2024.2.1. To see what's been fixed in this version of Android Studio, see the closed issues.

IntelliJ 2024.2 platform updates

Android Studio Ladybug includes the IntelliJ 2024.2 platform release, which has many new features such as integrated K2 mode for improved Kotlin stability, enhanced IDE startup efficiency, simplified cron expression management, and more.

Learn more

Support for Pixel 9 series devices

Android Studio and the latest Android Emulator now have device definitions for the Pixel 9, Pixel 9 Pro, Pixel 9 Pro XL, and the Pixel 9 Pro Fold, enabling you to validate your apps on these virtual devices to ensure they react correctly to a variety of screen sizes and device types. You should use API 35 with the Pixel 9 AVDs to ensure the best experience and access to the latest platform features.

Android Studio Ladybug Feature Drop | 2024.2.2

The following are new features in Android Studio Ladybug Feature Drop | 2024.2.2. To see what's been fixed in this version of Android Studio, see the closed issues.

Motion Editor deprecation

In the upcoming release, we will be deprecating the Motion Editor as part of our ongoing transition from XML to Jetpack Compose. Compose offers a more modern and efficient approach to building animations, and we encourage developers to start using Compose Animation Preview for new projects.

Code suggestions with Gemini in Android Studio

You can now provide custom prompts for Gemini in Android Studio to generate code suggestions:

  1. Enable Gemini by clicking View > Tool Windows > Gemini.
  2. To see the prompt field, right-click in the code editor and select Gemini > Transform selected code from the context menu.
  3. Prompt Gemini to generate a code suggestion that either adds new code or transforms selected code. Ask Gemini to simplify complex code by rewriting it, perform very specific code transformations such as "make this code idiomatic," or generate new functions you describe. Android Studio then shows you Gemini's code suggestion as a code diff, so you can review and accept only the suggestions you want.

Analyze crash reports with Gemini in Android Studio

Use Gemini in Android Studio to analyze your App Quality Insights crash reports, generate insights, provide a crash summary, and when possible recommend next steps, including sample code and links to relevant documentation.

Generate all of this information by clicking Show Insights in the App Quality Insights tool window in Android Studio after you enable Gemini from View > Tool Windows > Gemini.

Show insights from Gemini from the App Quality Insights tool window

Google Play SDK Index integration

The Android Studio Google Play SDK Index integration now includes warnings from the Google Play SDK Console. This gives you a complete view of any potential version or policy issues in your dependencies before submitting your app to the Google Play Console.

Android Studio now also displays notes from SDK authors directly in the editor to save you time.

Mock sensor capabilities and values

Android Studio now includes a new sensor panel, which lets you simulate a device having or not having specific sensor capabilities, such as a heart rate sensor, as well as set specific test values for these sensors. Use this panel to test how your app handles devices that have different sensor capabilities. This panel is useful for testing health and fitness apps, especially on Wear OS devices.

Button is near the middle of the panel row
The Wear Health Services panel, available in the emulator.

To open and use the panel, do the following:

  1. Create or open an Android Virtual Device (AVD) and run your app on the emulator.
  2. In the emulator panel, select Wear Health Services. Open Wear Health Services panel The Wear Health Services panel opens, showing a list of sensors that are available on different Android-powered devices.

After the panel opens, you can do the following:

  • Toggle among Standard capabilities, All capabilities (default), or Custom. Select Apply to send the current list of capabilities to the emulated device, and select Reset to restore the list of capabilities to their default on-off values.
  • Trigger different user events after you select the Trigger events drop-down button. From here, you can Trigger auto pause/resume of fitness activities, Trigger sleep events by the user, and Trigger golf shots that the user takes on a golf course or mini-golf course.
  • Override sensor values, after you begin an exercise in an app that's installed on the emulator. After you enter new values for different exercise metrics, select Apply to sync these values with the emulator. This is useful for testing how your app handles different exercise conditions and users' fitness tendencies.

Compose Preview Screenshot Testing tool

Use the Compose Preview Screenshot Testing tool to test your Compose UIs and prevent regressions. The new tool helps you generate HTML reports that let you visually detect any changes to your app's UI. Learn more at Compose Preview Screenshot Testing.

Lint behavior change

Starting with Android Gradle Plugin 8.7.0-alpha08, if there is a LintError when running lint using Gradle, the lint analysis task will throw an exception. The reason for this change is to prevent rare errors from being cached in the build cache.

Unfortunately, this change will break builds for projects with genuine LintError instances in their lint baseline files. The error message will contain information about which lint checks are causing the problem. In some cases, updating the corresponding library dependency might resolve the problem. If not, you can disable the problematic lint check until the library author fixes it.