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 growth surroundings (IDE) centered 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 world wide to create wonderful app experiences for his or her customers. And with Google’s push to unlock the ability 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 once you develop for a number of type 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 information and steering, goal the most recent 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 |
Bounce proper in and download Android Studio Hedgehog, or study extra about probably the most thrilling new options under.
Coding productiveness
Introducing Android Studio Bot
On the coronary heart of our mission is to speed up your capability to put in writing 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 on your app and make you extra productive. You may as well ask inquiries to study extra about Android growth or assist repair errors in your current code — all with out ever having to go away Android Studio. Studio Bot is in its very early days, and we’re coaching it to develop into even higher at answering your questions and serving to you study greatest practices. We encourage you to strive it out for yourselves, and assist it enhance by sharing your suggestions straight with Studio Bot.
Privateness is high of thoughts, and what’s distinctive on this integration is that you just don’t have to 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 principles that maintain us accountable. We’re taking a measured strategy to our rollout; for this preliminary launch, Studio Bot is simply obtainable to Android builders within the US. You may learn extra here
Dwell Edit
Dwell Edit helps maintain you within the movement by minimizing interruptions once you make updates to your Compose UI and validates these adjustments on a operating gadget. You should use it in guide mode to regulate when the operating app ought to be up to date or in computerized mode to replace the operating app as you make code adjustments. Dwell Edit is accessible in Android Studio Giraffe Beta, with the Hedgehog launch offering further enhancements in error dealing with and reporting.
Dwell Edit with Compose |
Construct productiveness
Kotlin DSL and Model Catalogs
Various updates assist you to 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 build scripts, it’s additionally the popular strategy to configure your construct as a result of Kotlin is extra readable and affords higher compile-time checking and IDE help. Moreover, we’ve additionally added experimental help for TOML-based Gradle Model Catalogs, a function that permits you to handle dependencies in a single central location and share dependencies throughout modules or initiatives. Android Studio now makes it simpler to configure version catalogs by way of editor solutions and integrations with the Mission Construction dialog, plus the New Mission Wizard.
Kotlin DSL and Model Catalogs within the New Mission Wizard |
Per-app language preferences
Sometimes, multilingual customers set their system language to 1 language—comparable to English—however they wish to choose different languages for particular apps, comparable 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 robotically. Learn more.
Obtain influence throughout Sync
When utilizing Android Gradle Plugin 7.3 or increased, The Construct > Sync device window now features a abstract of time spent downloading dependencies and an in depth view of downloads per repository, so you possibly can simply decide whether or not sudden downloads are impacting construct efficiency. Moreover, it might assist you to establish inefficiencies in the way you configure your repositories. Learn more.
Construct Analyzer displaying influence of downloads throughout construct |
New Android SDK Improve Assistant
Android Studio Giraffe introduces the Android SDK Improve Assistant, a brand new device that helps you improve the targetSdkVersion, which is the API degree 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 degree by degree 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 how you can handle them, serving to you get to benefiting from what the most recent variations of Android have to supply rather more shortly. To open the Android SDK Improve Assistant, go to Instruments > Android SDK Improve Assistant. Within the Assistant panel, choose the API degree that you just wish to improve to for steering.
Improve extra shortly with the Android SDK Improve Assistant |
Creating for type 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 gadget profiles in Android Studio Hedgehog. To begin, open Gadget Supervisor and choose Create Gadget.
Pixel Pill operating on the Android Emulator |
Emulator Assist for Put on OS 4 Developer Preview
Put on OS 4 is the following era OS for Put on. Primarily based on Android 13, it formally launches within the fall and has an awesome collection 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 advocate you strive it with Android Studio Hedgehog and check that your Put on OS app works as supposed with the most recent platform updates. The Wear OS 4 emulator gives you a sooner and smoother transition to Put on OS 4, and assist you to make apps prepared in time for the official Put on OS 4 launch on actual gadgets. Try the Wear 4 Preview site for how you can 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 can be no code in your watch face APK. The platform takes care of the logic wanted to render the watch face so that you not have to fret about code optimizations or battery efficiency. Use watch face creation instruments comparable to Watch Face Studio to design watch faces, or you possibly can manually or dynamically edit the watch face format to construct watch faces straight. You may check the brand new Watch Face Format on the Put on OS 4 emulator.
Watch Face Format Watchface on Put on 4 Emulator |
Gadget Mirroring for native gadgets
Whether or not you utilize a direct USB connection or ADB over Wi-Fi, Gadget Mirroring enables you to see and work together along with your native bodily gadgets straight throughout the Android Studio Working Units window. This function enables you to concentrate on the way you develop and check your app multi function 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 straight from the IDE.
Gadget Mirroring with the Pixel Fold |
Android Gadget Streaming
We all know typically it’s essential so that you can see and check how your apps work on bodily {hardware} to make sure that your customers have the very best expertise. Nonetheless, accessing the most recent flagship gadgets isn’t all the time straightforward. Constructing on high of Gadget Mirroring for native gadgets, we’re introducing gadget streaming of distant bodily Google Pixel gadgets, such because the Pixel Fold and Pixel Pill, straight inside Android Studio. Gadget streaming will allow you to deploy your app to those distant gadgets and work together with them, all with out having to go away the IDE. In the event you’re considering getting early entry later this yr, enroll now.
Espresso Gadget 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, comparable to rotating or folding a tool, has all the time been a problem. Espresso Gadget API is now obtainable that will help you write exams that carry out synchronous configuration adjustments when testing on Android digital gadgets operating API degree 24 and better. You may as well arrange check filters to make sure that exams that require sure gadget options, comparable to a folding motion, solely run on gadgets that help them. Learn more.
Synchronous gadget configuration adjustments utilizing the Espresso Gadget API |
Enhance your app high quality
App High quality Insights with Android vitals
App High quality Insights launched in Android Studio Electrical Eel to offer entry to Firebase Crashlytics concern experiences straight from the IDE. The combination enables you to navigate between your stack hint and code with a click on, use filters to see solely an important points, and see report particulars that will help you reproduce points. In Android Studio Hedgehog, now you can view vital crash experiences from Android vitals, powered by Google Play. Android vitals experiences additionally embrace helpful insights, comparable to notes from SDK suppliers in an effort to shortly diagnose and resolve crashes associated to SDKs your app could be utilizing.
Android vitals crash experiences within the App High quality Insights window |
App High quality Insights with improved code navigation
If you publish your app utilizing the most recent model of AGP 8.2, crash experiences now connect minimal git commit hash information to assist Android Studio navigate to your code when investigating Crashlytics crash experiences within the IDE. Now, once you view a report that features the mandatory metadata, you possibly can 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 info in Debugger
When components of your Compose UI recompose unexpectedly, it might typically be obscure why. Now, when setting a breakpoint on a Composable perform, the debugger lists the parameters of the composable and their state, so you possibly can extra simply establish what adjustments might need precipitated the recomposition. For instance, once you pause on a composable, the debugger can let you know precisely which parameters have “Modified” or have remained “Unchanged”, so you possibly can extra effectively examine the reason for the recomposition.
Compose state info 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 operating Android 10 and better. Knowledge is segmented by every sub-system (comparable to, Digicam, GPS, and extra). This information is made obtainable when recording a System Hint through the Profiler and lets you visually correlate energy consumption of the gadget to the actions taking place in your app. For instance, you possibly can A/B check a number of algorithms of your video calling app to optimize energy consumed by the digital camera sensor.
The brand new Energy Profiler |
Gadget Explorer
The Gadget File Explorer in Giraffe has been renamed to Gadget Explorer and up to date to incorporate details about debuggable processes operating 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 an inventory of debuggable processes for the linked gadget. From there you can too choose a course of and carry out a Kill course of motion (which runs am
kill), a Power cease (which runs am force-stop) , or connect the debugger to a specific course of.
Processes tab within the Gadget Explorer window |
Compose animation preview
Compose Animation Preview in Android Studio Hedgehog now helps quite a lot of further 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 possibly can play, pause, scrub, management pace, and coordinate.
Compose Animation Preview |
Embedded Structure Inspector
Now you can run Layout Inspector straight embedded within the Working Gadget Window in Android Studio! Check out this function at present in Android Studio Hedgehog to preserve display screen actual property and arrange your UI debugging workflow in a single device window. You may entry widespread Structure Inspector options comparable to debugging the structure of your app by displaying a view hierarchy and permitting you to examine the properties of every view. Moreover, as a result of the embedded Structure Inspector overlays on high of the prevailing gadget mirroring stream, total efficiency when utilizing the inspector is now a lot sooner. To get began and perceive identified limitations, learn the release notes.
Embedded Structure Inspector |
Firebase Take a look at Lab help for Gradle Managed Units
Gradle Managed Devices launched in Android Gradle Plugin (AGP) 7.3 to make it simpler to make the most of digital gadgets when operating automated exams in your steady integration (CI) infrastructure by permitting Gradle to handle all features of gadget provisioning. All it is advisable do is use the AGP DSL to explain the gadgets you needed Gradle to make use of. However typically it is advisable run your exams on bodily Android gadgets. With AGP 8.2, we’ve expanded Gradle Managed Units with the power to focus on actual bodily (and digital) gadgets operating in Firebase Take a look at Lab (FTL). The aptitude makes it simpler than ever to scalably check throughout the massive collection of FTL gadgets with just a few easy steps. Moreover, this model of AGP may benefit from FTL’s new Good Sharding capabilities, which lets you get check outcomes again rather more shortly by using a number of gadgets that run in parallel. To study extra and get began, learn the release notes.
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, sooner import of Maven initiatives, and a extra streamlined commit course of. Learn the IntelliJ launch notes here.
New UI
Together with the IntelliJ platform replace comes additional enhancements to the New UI. Largely attributable to 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 cut up the device window space and conveniently organize the home windows, similar to within the outdated UI. We additionally improved the Android-specific UI by updating the principle toolbar, device home windows, and new iconography. To make use of the New UI, allow it in Settings > Look & Conduct > New UI. For a full checklist of adjustments, see the IntelliJ New UI documentation.
The New UI adopted from IntelliJ |
Abstract
To recap, Android Studio Giraffe is accessible within the Beta channel. Android Studio Hedgehog is the most recent model of the IDE and is accessible 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) Dwell Edit, which helps maintain you within the movement by minimizing interruptions once you make updates to your Compose UI and validate these adjustments on a operating gadget.
Construct productiveness
- (Beta) Kotlin DSL and Model Catalogs, which helps you benefit from extra trendy syntax and conventions when configuring your construct.
- (Beta) Per-app language preferences, built-in help in AGP for robotically 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 possibly can 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 degree that your app targets, rather more shortly.
Creating for type components
- Google Pixel Fold and Google Pixel Pill Digital Units, which may also 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 era 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.
- Gadget Mirroring for native gadgets, which helps you to see and work together along with your native bodily gadgets straight inside Android Studio’s Working Units window.
- Android Gadget Streaming, a tool streaming of distant bodily Google Pixel gadgets, which you’ll be able to register for early access at present!
- Espresso Gadget API, which helps you write exams that carry out synchronous configuration adjustments when testing on Android digital gadgets operating API degree 24 and better.
Enhance your app high quality
- App High quality Insights: Android vitals, which now lets your view, filter, and navigate vital crash experiences 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 info in Debugger, which lists the parameters of the composable and their state when paused on a breakpoint in a composable, so you possibly can extra simply establish what adjustments might need precipitated the recomposition.
- New Energy Profiler, which exhibits extremely correct energy consumption from the gadget segmented by every sub-system.
- (Beta) Gadget Explorer, which now contains details about debuggable processes operating on linked gadgets and actions you possibly can carry out on them.
- (Beta) Compose animation preview, now helps quite a lot of further Compose APIs and new pickers that allow you to set non-enum or boolean states to debug your Compose animation utilizing exact inputs.
- Embedded Structure Inspector, which runs Structure Inspector straight embedded within the Working Gadget 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 on your automated testing, and now with further help for sensible sharding.
IntelliJ
- IntelliJ Platform Replace to the IntelliJ 2023.1 platform launch, which incorporates quite a lot of efficiency and high quality of life enhancements.
- New UI replace that permits Android Studio to undertake quite a lot of enhancements to IntilliJ’s trendy design language.
See the Android Studio Preview release notes and the Android Emulator release notes for extra particulars.
Obtain Android Studio Immediately!
You may download Android Studio Hedgehog Canary or Android Studio Giraffe Beta at present to include the brand new options into your workflow. You may set up them aspect by aspect with a secure model of Android Studio by following these instructions. The Beta launch is close to secure launch high quality, however bugs may nonetheless exist, and Canary options are vanguard options. As all the time, we admire any suggestions on belongings you like or options you wish to see. In the event you discover a bug, please report the issue and in addition take a look at known issues. Keep in mind to additionally observe us on Twitter, Medium, or YouTube for extra Android growth updates!