HomeAndroidAsserting Studio Bot, an AI-powered coding assistant

Asserting Studio Bot, an AI-powered coding assistant



Posted by Adarsh Fernando, Senior Product Supervisor, Android Studio

We first introduced Android Studio at I/O 2013 with a promise to ship a best-in-class built-in improvement atmosphere (IDE) targeted on Android app builders. 10 years later, this dedication to developer productiveness nonetheless drives the crew to ship new instruments and options that assist groups all over the world to create superb app experiences for his or her customers. And with Google’s push to unlock the facility of AI that will help you all through your day, Android Studio Hedgehog introduces a key breakthrough: an AI-powered conversational expertise designed to make you extra productive.

Along with accelerating coding productiveness, this newest model of the IDE offers higher instruments if you develop for a number of kind components, and helps you enhance app high quality with new insights, debugging, and testing options. All these enhancements add to the various updates we’ve included in Android Studio Giraffe, which is now within the Beta channel and helps make it simpler to configure your builds with Kotlin DSL help, enhance sync instances with new knowledge and steering, goal the newest Android SDK model with the brand new Android SDK Improve Assistant, and extra.

To see highlights of the brand new options in motion together with Studio Bot, watch the What’s new in Android Developer Instruments session from Google I/O 2023.

What’s new in Android Improvement Instruments – with Studio Bot Demo

Leap proper in and obtain Android Studio Hedgehog, or be taught extra about probably the most thrilling new options beneath.

Coding productiveness

Introducing Android Studio Bot

On the coronary heart of our mission is to speed up your means to jot down high-quality code for Android. On this launch we’re excited to introduce an AI-powered conversational expertise known as Studio Bot, that leverages Codey, Google’s basis mannequin for coding that could be a descendant of PaLM 2, that will help you generate code to your app and make you extra productive. You can even ask inquiries to be taught extra about Android improvement or assist repair errors in your current code — all with out ever having to depart Android Studio. Studio Bot is in its very early days, and we’re coaching it to turn into even higher at answering your questions and serving to you be taught greatest practices. We encourage you to strive it out for yourselves, and assist it enhance by sharing your suggestions immediately with Studio Bot.

Privateness is prime of thoughts, and what’s distinctive on this integration is that you simply don’t must ship your supply code to Google to make use of Studio Bot—solely the chat dialogue between you and Studio Bot is shared. Very like our work on different AI initiatives, we stick with a set of rules that maintain us accountable. We’re taking a measured method to our rollout; for this preliminary launch, Studio Bot is just accessible to Android builders within the US. You’ll be able to learn extra right here

Reside Edit

Reside Edit helps preserve you within the circulation by minimizing interruptions if you make updates to your Compose UI and validates these adjustments on a working system. You should use it in handbook mode to regulate when the working app needs to be up to date or in computerized mode to replace the working app as you make code adjustments. Reside Edit is on the market in Android Studio Giraffe Beta, with the Hedgehog launch offering extra enhancements in error dealing with and reporting.

Moving image showing live edit with Compose
Reside Edit with Compose

Construct productiveness

Kotlin DSL and Model Catalogs

A lot of updates enable you leverage extra trendy syntax and conventions when configuring your construct. Kotlin is the advisable language when creating for Android. Now, with official help for Kotlin DSL in your Gradle construct scripts, it’s additionally the popular strategy to configure your construct as a result of Kotlin is extra readable and provides higher compile-time checking and IDE help. Moreover, we’ve additionally added experimental help for TOML-based Gradle Model Catalogs, a function that allows you to handle dependencies in a single central location and share dependencies throughout modules or initiatives. Android Studio now makes it simpler to configure model catalogs by means of editor solutions and integrations with the Undertaking Construction dialog, plus the New Undertaking Wizard.

Screengrab showing Kotlin DSL and Version Catalogs in the New Project Wizard
Kotlin DSL and Model Catalogs within the New Undertaking Wizard

Per-app language preferences

Usually, multilingual customers set their system language to at least one language—akin to English—however they need to choose different languages for particular apps, akin to Dutch, Chinese language, or Hindi. Android 13 launched help for per-app language preferences, and now Android Gradle plugin 8.1 and better can configure your app to help it mechanically. Be taught extra.

Obtain influence throughout Sync

When utilizing Android Gradle Plugin 7.3 or larger, The Construct > Sync instrument window now features a abstract of time spent downloading dependencies and an in depth view of downloads per repository, so you’ll be able to simply decide whether or not sudden downloads are impacting construct efficiency. Moreover, it will possibly enable you establish inefficiencies in the way you configure your repositories. Be taught extra.

Screengrab of Build Analyzer showing impact of downloads during build
Construct Analyzer exhibiting influence of downloads throughout construct

New Android SDK Improve Assistant

Android Studio Giraffe introduces the Android SDK Improve Assistant, a brand new instrument that helps you improve the targetSdkVersion, which is the API stage that your app targets. As an alternative of getting to navigate each API change with an Android SDK launch, the Android SDK Improve Assistant guides you thru upgrading targetSdkVersion stage by stage by making a personalized filter of API adjustments which might be related to your app. For every migration step, it highlights the key breaking adjustments and find out how to tackle them, serving to you get to profiting from what the newest variations of Android have to supply rather more rapidly. To open the Android SDK Improve Assistant, go to Instruments > Android SDK Improve Assistant. Within the Assistant panel, choose the API stage that you simply need to improve to for steering.

Screengrab of Build Analyzer showing impact of downloads during build
Improve extra rapidly with the Android SDK Improve Assistant

Growing for kind components

Google Pixel Fold and Pill Digital Units

Though these gadgets received’t launch till later this yr, you can begin making ready your app to take full benefit of the expanded display screen sizes and performance of those gadgets by creating digital gadgets utilizing new Google Pixel Fold and Google Pixel Pill system profiles in Android Studio Hedgehog. To begin, open System Supervisor and choose Create System.

Screengrab of Pixel Tablet running on the Android Emulator
Pixel Pill working on the Android Emulator

Emulator Assist for Put on OS 4 Developer Preview

Put on OS 4 is the following technology OS for Put on. Primarily based on Android 13, it formally launches within the fall and has an amazing number of new options and optimizations. We’re providing you with a preview of all the brand new platform options with the brand new Put on OS 4 emulator. We suggest you strive it with Android Studio Hedgehog and take a look at that your Put on OS app works as supposed with the newest platform updates. The Put on OS 4 emulator gives you a quicker and smoother transition to Put on OS 4, and enable you make apps prepared in time for the official Put on OS 4 launch on actual gadgets. Take a look at the Put on 4 Preview web site for find out how to get began with the brand new Put on OS 4 emulator.

Watch Face Format help in Put on OS 4 Emulator

Along with Samsung, we’re excited to announce the launch of the Watch Face Format, a brand new strategy to construct watch faces for Put on OS. The Watch Face Format is a declarative XML format, that means there will likely be no code in your watch face APK. The platform takes care of the logic wanted to render the watch face so that you now not have to fret about code optimizations or battery efficiency. Use watch face creation instruments akin to Watch Face Studio to design watch faces, or you’ll be able to manually or dynamically edit the watch face format to construct watch faces immediately. You’ll be able to take a look at the brand new Watch Face Format on the Put on OS 4 emulator.

Moving image of Watch Face Format Watchface on Wear 4 Emulator
Watch Face Format Watchface on Put on 4 Emulator

System Mirroring for native gadgets

Whether or not you employ a direct USB connection or ADB over Wi-Fi, System Mirroring permits you to see and work together together with your native bodily gadgets immediately throughout the Android Studio Working Units window. This function permits you to give attention to the way you develop and take a look at your app multi functional place. With the Hedgehog launch, we’re including extra performance, together with the power to reflect Put on OS gadgets and simulate folding actions on foldable gadgets immediately from the IDE.

Screengrab showing device mirroring with the Pixel Fold
System Mirroring with the Pixel Fold

Android System Streaming

We all know typically it’s important so that you can see and take a look at how your apps work on bodily {hardware} to make sure that your customers have the perfect expertise. Nonetheless, accessing the newest flagship gadgets isn’t all the time straightforward. Constructing on prime of System Mirroring for native gadgets, we’re introducing system streaming of distant bodily Google Pixel gadgets, such because the Pixel Fold and Pixel Pill, immediately inside Android Studio. System streaming will allow you to deploy your app to those distant gadgets and work together with them, all with out having to depart the IDE. In case you’re excited by getting early entry later this yr, enroll now.

Espresso System API

Automated testing of your app utilizing Espresso APIs helps you catch potential points early, earlier than they attain customers. Nonetheless, testing your app throughout configuration adjustments, akin to rotating or folding a tool, has all the time been a problem. Espresso System API is now accessible that will help you write checks that carry out synchronous configuration adjustments when testing on Android digital gadgets working API stage 24 and better. You can even arrange take a look at filters to make sure that checks that require sure system options, akin to a folding motion, solely run on gadgets that help them. Be taught extra.

Example of test code for synchronous device configuration changes using the Espresso Device API
Synchronous system configuration adjustments utilizing the Espresso System API

Enhance your app high quality

App High quality Insights with Android vitals

App High quality Insights launched in Android Studio Electrical Eel to supply entry to Firebase Crashlytics concern studies immediately from the IDE. The combination permits you to navigate between your stack hint and code with a click on, use filters to see solely crucial points, and see report particulars that will help you reproduce points. In Android Studio Hedgehog, now you can view essential crash studies from Android vitals, powered by Google Play. Android vitals studies additionally embody helpful insights, akin to notes from SDK suppliers in an effort to rapidly diagnose and resolve crashes associated to SDKs your app is likely to be utilizing.

Screengrab showing Android vitals crash reports in the App Quality Insights window
Android vitals crash studies within the App High quality Insights window

App High quality Insights with improved code navigation

While you publish your app utilizing the newest model of AGP 8.2, crash studies now connect minimal git commit hash knowledge to assist Android Studio navigate to your code when investigating Crashlytics crash studies within the IDE. Now, if you view a report that features the required metadata, you’ll be able to select to both navigate to the road of code in your present git checkout, or view a diff between the checkout and the model of your codebase that generated the crash. To get began with the correct dependencies, see the documentation.

Compose State data in Debugger

When components of your Compose UI recompose unexpectedly, it will possibly typically be obscure why. Now, when setting a breakpoint on a Composable operate, the debugger lists the parameters of the composable and their state, so you’ll be able to extra simply establish what adjustments may need prompted the recomposition. For instance, if you pause on a composable, the debugger can let you know precisely which parameters have “Modified” or have remained “Unchanged”, so you’ll be able to extra effectively examine the reason for the recomposition.

Screengrab showing Compose state information in the debugger
Compose state data within the debugger

New Energy Profiler

We’re excited to announce a model new Energy Profiler in Android Studio Hedgehog, which exhibits energy consumption on the Pixel 6 and better gadgets working Android 10 and better. Information is segmented by every sub-system (akin to, Digital camera, GPS, and extra). This knowledge is made accessible when recording a System Hint by way of the Profiler and lets you visually correlate energy consumption of the system to the actions occurring in your app. For instance, you’ll be able to A/B take a look at a number of algorithms of your video calling app to optimize energy consumed by the digital camera sensor.

Image of the new power profiler
The brand new Energy Profiler

System Explorer

The System File Explorer in Giraffe has been renamed to System Explorer and up to date to incorporate details about debuggable processes working on linked gadgets. Along with the Recordsdata tab, which incorporates current performance that means that you can discover a tool’s file hierarchy, the brand new Processes tab means that you can view a listing of debuggable processes for the linked system. From there you may as well choose a course of and carry out a Kill course of motion (which runs am kill), a Pressure cease (which runs am force-stop) , or connect the debugger to a specific course of.

Image of the new power profiler
Processes tab within the System Explorer window

Compose animation preview

Compose Animation Preview in Android Studio Hedgehog now helps quite a few extra Compose APIs, animate*AsState, CrossFade, rememberInfiniteTransition, and AnimatedContent (along with updateTransition and AnimatedVisibility). Compose Animation Preview additionally has new pickers that allow you to set non-enum or boolean states to debug your Compose animation utilizing exact inputs. For all supported Compose Animation APIs, you’ll be able to play, pause, scrub, management velocity, and coordinate.

Moving image of Compose Animation preview
Compose Animation Preview

Embedded Format Inspector

Now you can run Format Inspector immediately embedded within the Working System Window in Android Studio! Check out this function immediately in Android Studio Hedgehog to preserve display screen actual property and set up your UI debugging workflow in a single instrument window. You’ll be able to entry frequent Format Inspector options akin to debugging the structure of your app by exhibiting a view hierarchy and permitting you to examine the properties of every view. Moreover, as a result of the embedded Format Inspector overlays on prime of the prevailing system mirroring stream, general efficiency when utilizing the inspector is now a lot quicker. To get began and perceive identified limitations, learn the launch notes.

Screengrab of embedded Layout Inspector
Embedded Format Inspector

Firebase Take a look at Lab help for Gradle Managed Units

Gradle Managed Units launched in Android Gradle Plugin (AGP) 7.3 to make it simpler to make the most of digital gadgets when working automated checks in your steady integration (CI) infrastructure by permitting Gradle to handle all points of system provisioning. All it’s essential to do is use the AGP DSL to explain the gadgets you wished Gradle to make use of. However typically it’s essential to run your checks on bodily Android gadgets. With AGP 8.2, we’ve got expanded Gradle Managed Units with the power to focus on actual bodily (and digital) gadgets working in Firebase Take a look at Lab (FTL). The aptitude makes it simpler than ever to scalably take a look at throughout the massive number of FTL gadgets with just a few easy steps. Moreover, this model of AGP may also make the most of FTL’s new Sensible Sharding capabilities, which lets you get take a look at outcomes again rather more rapidly by using a number of gadgets that run in parallel. To be taught extra and get began, learn the launch notes.

Image of gradle managed devices with support for Firebase Test Lab
Gradle Managed Units with help for Firebase Take a look at Lab

IntelliJ

IntelliJ Platform Replace

Android Studio Hedgehog (2023.1) contains the IntelliJ 2023.1 platform launch, which comes with IDE startup efficiency enhancements, quicker import of Maven initiatives, and a extra streamlined commit course of. Learn the IntelliJ launch notes right here.

New UI

Together with the IntelliJ platform replace comes additional enhancements to the New UI. Largely on account of neighborhood suggestions, there’s a brand new Compact Mode, which offers a extra consolidated feel and look of the IDE, and an choice to vertically break up the instrument window space and conveniently prepare the home windows, similar to within the outdated UI. We additionally improved the Android-specific UI by updating the principle toolbar, instrument home windows, and new iconography. To make use of the New UI, allow it in Settings > Look & Habits > New UI. For a full record of adjustments, see the IntelliJ New UI documentation.

Screengrab showing the new UI adopted from IntelliJ
The New UI adopted from IntelliJ

Abstract

To recap, Android Studio Giraffe is on the market within the Beta channel. Android Studio Hedgehog is the newest model of the IDE and is on the market within the Canary channel, and contains all of those new enhancements and options:

Coding productiveness

  • Android Studio Bot, is a tightly built-in, AI-powered assistant in Android Studio designed to make you extra productive.
  • (Beta) Reside Edit, which helps preserve you within the circulation by minimizing interruptions if you make updates to your Compose UI and validate these adjustments on a working system.

Construct productiveness

  • (Beta) Kotlin DSL and Model Catalogs, which helps you make the most of extra trendy syntax and conventions when configuring your construct.
  • (Beta) Per-app language preferences, built-in help in AGP for mechanically configuring per-app language preferences.
  • (Beta) Obtain influence in Construct Analyzer, which offers a abstract of time spent downloading dependencies and an in depth view of downloads per repository, so you’ll be able to simply decide whether or not sudden downloads are impacting construct efficiency.
  • (Beta) New Android SDK Improve Assistant, which helps you improve the targetSdkVersion, which is the API stage that your app targets, rather more rapidly.

Growing for kind components

  • Google Pixel Fold and Google Pixel Pill Digital Units, which may help you begin making ready your app to take full benefit of the expanded display screen sizes and performance of those gadgets earlier than they’re available in shops.
  • Put on OS 4 Developer Preview Emulator, which equally offers you early entry to check and optimize your app in opposition to the following technology of Put on OS by Google.
  • Watch Face Format help in Put on OS 4 Developer Preview Emulator, a brand new strategy to construct watch faces for Put on OS.
  • System Mirroring for native gadgets, which helps you to see and work together together with your native bodily gadgets immediately inside Android Studio’s Working Units window.
  • Android System Streaming, a tool streaming of distant bodily Google Pixel gadgets, which you’ll register for early entry immediately!
  • Espresso System API, which helps you write checks that carry out synchronous configuration adjustments when testing on Android digital gadgets working API stage 24 and better.

Enhance your app high quality

  • App High quality Insights: Android vitals, which now lets your view, filter, and navigate essential crash studies from Android vitals, powered by Google Play.
  • App High quality Insights with improved code navigation, which helps you to now select to both navigate to the road of code in your present git checkout, or view a diff between the checkout and the model of your codebase that generated the crash.
  • Compose State data in Debugger, which lists the parameters of the composable and their state when paused on a breakpoint in a composable, so you’ll be able to extra simply establish what adjustments may need prompted the recomposition.
  • New Energy Profiler, which exhibits extremely correct energy consumption from the system segmented by every sub-system.
  • (Beta) System Explorer, which now contains details about debuggable processes working on linked gadgets and actions you’ll be able to carry out on them.
  • (Beta) Compose animation preview, now helps quite a few extra Compose APIs and new pickers that allow you to set non-enum or boolean states to debug your Compose animation utilizing exact inputs.
  • Embedded Format Inspector, which runs Format Inspector immediately embedded within the Working System Window in Android Studio, resulting in a extra seamless debugging expertise and vital efficiency enhancements.
  • Firebase Take a look at Lab help for Gradle Managed Units, which leverages GMD that will help you seamlessly configure Firebase Take a look at Lab gadgets to your automated testing, and now with extra help for good sharding.

IntelliJ

  • IntelliJ Platform Replace to the IntelliJ 2023.1 platform launch, which incorporates quite a few efficiency and high quality of life enhancements.
  • New UI replace that enables Android Studio to undertake quite a few enhancements to IntilliJ’s trendy design language.

See the Android Studio Preview launch notes and the Android Emulator launch notes for extra particulars.

Obtain Android Studio Right this moment!

You’ll be able to obtain Android Studio Hedgehog Canary or Android Studio Giraffe Beta immediately to include the brand new options into your workflow. You’ll be able to set up them aspect by aspect with a steady model of Android Studio by following these directions. The Beta launch is close to steady launch high quality, however bugs may nonetheless exist, and Canary options are vanguard options. As all the time, we recognize any suggestions on belongings you like or options you want to see. In case you discover a bug, please report the problem and likewise take a look at identified points. Bear in mind to additionally observe us on Twitter, Medium, or YouTube for extra Android improvement updates!



RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments