Posted by Paris Hsu – Product Manager, Android Studio
The next wave of innovation is here with Android Studio Narwhal Feature Drop. We’re thrilled to announce that Gemini in Android Studio’s Agent Mode is now available in the stable release, ready to tackle your most complex coding challenges. This release also brings powerful new tools for XR development, continued quality improvements, and key updates to enhance your productivity and help you build high-quality apps.
Dive in to learn more about all the updates and new features designed to supercharge your workflow.

Develop with Gemini
Try out Agent Mode
Go beyond chat and assign tasks to Gemini. Gemini in Android Studio’s Agent Mode is a powerful AI feature designed to handle complex, multi-stage development tasks. To use Agent Mode, click Gemini in the sidebar and then select the Agent tab. You can describe a high-level goal, like adding a new feature, generating comprehensive unit tests, or fixing a nuanced bug.
The agent analyzes your request, breaks it down into smaller steps, and formulates an execution plan that uses IDE tools, such as reading and writing files and performing Gradle tasks, and can span multiple files in your project. It then iteratively suggests code changes, and you’re always in control—you can review, accept, or reject the proposed changes and ask the agent to iterate based on your feedback. Let the agent handle the heavy lifting while you focus on the bigger picture.
After releasing Agent Mode to Canary, we had positive feedback from the developers who tried it. We were so excited about the feature’s potential, we moved it to the stable channel faster than ever before, so that you can get your hands on it. Try it out and let us know what you build.

Currently, the default model offered in the free tier in Android Studio has a shorter context length, which can limit the depth of response from some agent questions and tasks. In order to get the best performance from Agent Mode, you can bring your own key for the public Gemini API. Once you add your Gemini API key with a paid GCP project, you’ll then be able to use the latest Gemini 2.5 Pro with a full 1M context window from Android Studio. Remember to pick the “Gemini 2.5 Pro” from the model picker in the chat and agent input boxes.

Rules in prompt library
Tailor the response from Gemini to fit your project’s specific needs with Rules in the prompt library. You can define preferred coding styles, tech stacks, languages, or output formats to help Gemini understand your project standards for more accurate and personalized code assistance. You can set these preferences once, and they’ll be automatically applied to all subsequent prompts sent to Gemini. For example, you can create a rule such as, “Always provide concise responses in Kotlin using Jetpack Compose.” You can also set rules at the IDE level for personal use across projects, or at the project level, which can be shared with teammates by adding the .idea folder to your version control system.

Transform UI with Gemini [Studio Labs]
You can now transform UI code within the Compose Preview environment using natural language, directly in the preview. This experimental feature, available through Studio Labs, speeds up UI development by letting you iterate with simple text commands. To use it, right-click in the Compose Preview and select Transform UI With Gemini. Then enter your natural language requests, such as “Center align these buttons,” to guide Gemini in adjusting your layout or styling, or select specific UI elements in the preview for better context. Gemini will then edit your Compose UI code in place, which you can review and approve.

Immersive development
XR Android Emulator and template
Kickstart your extended reality development! Android Studio now includes:
- XR Android Emulator: The XR Android Emulator now launches embedded within the IDE by default. You can deploy your Jetpack app, navigate the 3D space, and use the Embedded Layout Inspector directly inside Android Studio.
- XR template: Get a head start on your next project with a new template specifically designed for Jetpack XR. This provides a solid foundation with boilerplate code to begin your immersive experience development journey right away.


Embedded Layout Inspector for XR
The embedded Layout Inspector now supports XR applications, which lets you inspect and optimize your UI layouts within the XR environment. Get detailed insights into your app’s component structure and identify potential layout issues to create more polished and performant experiences.

Android Partner Device Labs available with Android Device Streaming
Android Partner Device Labs are device labs operated by Google OEM partners, such as Samsung, Xiaomi, OPPO, OnePlus, vivo, and others, and expand the selection of devices available in Android Device Streaming. To learn more, see Connect to Android Partner Device Labs.

Optimize and refine
Jetpack Compose preview quality improvements
We’ve made several enhancements to Compose previews to make UI iteration faster and more intuitive:
- Improved code navigation: You can now click on a preview’s name to instantly jump to its @Preview definition, or click an individual component within the preview to navigate directly to the function where it’s defined. Hover states and improved keyboard arrow navigation make moving through multiple previews a breeze.
- Preview picker: The new Compose preview picker is now available. You can click any @Preview annotation in your Compose code to access the picker and easily manage your previews.


K2 mode by default
Android Studio now uses the K2 Kotlin compiler by default. This next-generation compiler brings significant performance improvements to the IDE and your builds. By enabling K2, we are paving the way for future Kotlin programming language features and an even faster, more robust development experience in Kotlin.

16 KB page size support
To help you prepare for the future of Android hardware, this release adds improved support for transitioning to 16 KB page sizes. Android Studio now offers proactive warnings when building apps that are incompatible with 16 KB devices. You can use the APK Analyzer to identify which specific libraries in your project are incompatible. Lint checks also highlight the native libraries which are not 16 KB aligned. To test your app in this new environment, a dedicated 16 KB emulator target is also available in the AVD Manager.


Services compatibility policy
Android Studio offers service integrations that help you and your team make faster progress as you develop, release, and maintain Android apps. Services are constantly evolving and may become incompatible with older versions of Android Studio. Therefore, we are introducing a policy where features that depend on a Google Cloud service are supported for approximately a year in each version of Android Studio. The IDE will notify you when the current version is within 30 days of becoming incompatible so you can update it.

Summary
To recap, Android Studio Narwhal Feature Drop includes the following enhancements and features:
Develop with Gemini
- Gemini in Android Studio: agent mode: use Gemini for tackling complex, multi-step coding tasks.
- Rules in Prompt Library: Customize Gemini’s output for your project’s standards.
- Transform preview with Gemini [Studio Labs]: Use natural language to iterate on Compose UI.
Immersive development
- Embedded XR Android Emulator: Test and debug XR apps directly within the IDE.
- XR template: A new project template to kickstart XR development.
- Embedded Layout Inspector for XR: Debug and optimize your UI in an XR environment.
- Android Partner Device Labs available with Android Device Streaming: access more Google OEM partner devices.
Optimize and refine
- Compose preview improvements: Better navigation and a new picker for a smoother workflow.
- K2 mode by default: Faster performance with the next-gen Kotlin compiler.
- 16KB page size support: Lint warnings, analysis, and an emulator to prepare for new devices.
- Services compatibility policy: Stay up-to-date for access to integrated Google services.
Get started
Ready to accelerate your development? Download Android Studio Narwhal Feature Drop and start exploring these powerful new features today! As always, your feedback is crucial to us.
Check known issues, report bugs, suggest improvements, and be part of our vibrant community on LinkedIn Medium, YouTube, or X. Let’s build the future of Android apps together!