Resizable Compose Preview, monthly releases and smarter AI

Resizable Compose Preview, monthly releases and smarter AI

Home » News » Resizable Compose Preview, monthly releases and smarter AI
Table of Contents

Posted by Paris Hsu – Product Supervisor, Android Studio

Welcome to the Android Studio Narwhal Function Drop 3 launch. This replace delivers vital enhancements throughout the board to reinforce your productiveness. Whereas we proceed to innovate with highly effective, project-aware AI help in Gemini, this launch additionally brings elementary upgrades to core growth workflows. Highlights embrace a resizable Compose Preview for quicker UI iteration and strong app Backup & Restore instruments to make sure easy app transfers throughout gadgets in your customers. These additions, alongside a extra context-aware Gemini, purpose to streamline each part of your growth course of.

These options are delivered as a part of our new month-to-month launch cadence for Android Studio, which permits us to offer enhancements extra often. Study extra about this transformation and the way we’re accelerating growth with month-to-month releases for Android Studio.

What’s New in Android Studio Narwhal 3 Function Drop

Develop with AI 🚀

Since launching Gemini in Android Studio, we have been working arduous to introduce options and integrations throughout Studio with the wants of Android builders in thoughts. Builders have been telling us concerning the productiveness advantages AI brings to their workflow — equivalent to Entri, who diminished their UI growth time per display by 40%.

With this launch, enhanced the way you work together with Gemini — with improved choices for offering undertaking context, file attachments, and help for picture attachments.

AGENTS.md: offering project-level context to Gemini

AGENTS.md is a Markdown file that allows you to present project-specific directions, coding fashion guidelines, and different steering that Gemini robotically makes use of for context. The AGENTS.md file may be checked into your model management system (like Git), guaranteeing your total staff shares the identical core directions and receives constant, context-aware AI help. AGENTS.md information are situated proper alongside your code; use a number of AGENTS.md information throughout completely different directories for extra granular management over your codebase.

screenshot of AGENT.md automatically included in Context Drawer in Android Studio

AGENTS.md robotically included in Context Drawer

screenshot of Sample AGENT.md file in Android Studio

Pattern AGENTS.md file

We’re making it a lot simpler to offer wealthy, on-the-fly context. That’s why we’re additionally excited to share that two highly effective options, Picture Attachment and the @File Context, are graduating from Studio Labs and at the moment are steady:

Picture attachment – Gemini in Android Studio

The power to connect pictures to your queries with Gemini is now out there within the steady channel! This characteristic accelerates UI growth and improves architectural understanding. You’ll be able to:

    • Generate UI from a mock-up: Present a design picture and ask Gemini to generate the Compose code.
    • Perceive an current display: Add a screenshot and ask Gemini to elucidate the UI’s element construction and knowledge move.
    • Debug UI bugs: Take a screenshot of a bug, circle the problem, and ask Gemini for options.

screenshot of image attachment in Gemini in Android Studio

Picture attachment in Gemini in Android Studio

@file attachment – Gemini in Android Studio

The File attachment and context drawer are additionally graduating from Studio Labs! Simply connect related undertaking information to your prompts by typing @ within the chat window. Gemini can then use the total context of these information to offer extra correct and related solutions. Gemini will even counsel information it thinks are related, which you’ll be able to simply add or take away.

screenshot of evoking @file attachment in Android Studio

Evoke @file attachment

What’s subsequent: Deeper integration with MCP help

Wanting forward, in our summer time episode of #TheAndroidShow, we went behind the scenes with Android Studio’s new MCP (Mannequin Context Protocol) help. This protocol enhances Gemini’s interoperability with the broader developer ecosystem, permitting it to connect with instruments like GitHub. Find out how MCP help could make Gemini’s Agent Mode much more useful in your workflow, and check out it right now within the Canary channel.

Optimize and refine ✨

This launch contains a number of new options that can assist you optimize your app, enhance undertaking group, and guarantee compliance.

Check app backup and restore

With new Android {hardware} gadgets popping out, guaranteeing a easy app switch expertise in your customers switching to a brand new system is vital. Android Studio now gives instruments to generate a backup of your app’s knowledge and restore it to a different system. This makes it a lot simpler to check your app’s backup and restore performance and shield customers from knowledge loss. Moreover, you possibly can create and fasten backups to your run configurations, making it simple to make the most of Backup and Restore in your day-to-day growth.

screenshot of backup and restore dialog in Android Studio

Backup and restore dialog

Play coverage insights

Get early warnings about potential Play coverage violations that can assist you construct extra compliant apps with Play Coverage Insights, now in Android Studio. The IDE now reveals lint warnings immediately in your code when it pertains to a Google Play coverage requirement. It’s also possible to combine these lint checks into your CI/CD pipelines. These insights present an summary of the coverage, dos and don’ts, and hyperlinks extra assets, serving to you deal with potential points early in your growth cycle.

moving image of Play policy insights in Android Studio

Play coverage insights instance

Proguard inspections for overly broad maintain guidelines

Android Studio’s Proguard file editor now warns you about maintain guidelines which are overly broad. These guidelines can restrict R8’s potential to optimize your code, doubtlessly impacting app dimension and efficiency. This inspection helps you write extra exact guidelines for a extra optimized app.

screenshot of proguard inspections example in Android Studio

Proguard inspections instance

Improved Android view for multi-module initiatives

For these engaged on giant initiatives, the Android view has a brand new setting to show construct information immediately below their corresponding modules. This alteration makes it simpler to navigate and handle construct scripts in initiatives with many modules.

screenshot of option to display build files in module in Android Studio

Choice to show construct information in module

Extra management over computerized undertaking sync

For builders engaged on giant initiatives, computerized Gradle syncs can generally interrupt your workflow. To provide you extra management, we’re introducing an possibility to change to handbook undertaking sync with reminders. When enabled, Android Studio will inform you when a sync is required, however allows you to determine when to run it, so there aren’t surprising interruptions. You’ll be able to do that characteristic by navigating to Settings > Construct, Execution, Deployment > Construct Instruments.

screenshot of project sync mode in Android Studio

screenshot of enable / disable auto project sync in Android Studio

Allow / Disable auto undertaking sync

Quicker UI iteration 🎨

Resizable compose preview

Constructing responsive UIs simply obtained simpler: Compose Preview now helps dynamic resizing, supplying you with immediate visible suggestions on how your UI adapts to completely different display sizes. Merely enter Focus mode within the Compose Preview and drag the sides to see your structure change in real-time. You’ll be able to even save a particular dimension as a brand new @Preview annotation with a single click on, streamlining your multi-device growth course of.

screenshot of enable / disable auto project sync in Android Studio

Resizable compose preview

Abstract

To recap, Android Studio Narwhal Function Drop 3 contains the next enhancements and options:

Develop with AI

    • AGENTS.md help: Present project-specific context to Gemini for extra tailor-made responses.
    • Picture attachment (Steady): Simply connect picture information for Gemini in Android Studio.
    • @File attachment (Steady): Simply connect undertaking information as context for Gemini in Android Studio.

Optimize and refine

    • Backup and restore help: Simply take a look at your app’s knowledge backup and restoration move.
    • Play coverage insights: Get early warnings about potential Play Coverage violations.
    • Proguard inspections: Establish and repair overly broad maintain guidelines for higher optimization.
    • Show construct information below module: Enhance undertaking navigation within the Android view.
    • Guide undertaking sync: Acquire extra management over when Gradle syncs happen in giant initiatives.

Quicker UI iteration

    • Resizable compose preview: Dynamically resize your previews to check responsive UIs immediately.

Get began

Able to speed up your growth? Obtain Android Studio Narwhal 3 Function Drop from the steady channel right now!

Your suggestions is important. Please proceed to share your ideas by reporting bugs or suggesting options. For early entry to the newest options, obtain Android Studio from the Canary channel.

Be a part of our vibrant Android developer neighborhood on LinkedIn, Medium, YouTube, or X. We will not wait to see what you construct!

Supply hyperlink

author avatar
roosho Senior Engineer (Technical Services)
I am Rakib Raihan RooSho, Jack of all IT Trades. You got it right. Good for nothing. I try a lot of things and fail more than that. That's how I learn. Whenever I succeed, I note that in my cookbook. Eventually, that became my blog. 

share this article.

Enjoying my articles?

Sign up to get new content delivered straight to your inbox.

Please enable JavaScript in your browser to complete this form.
Name