Posted by Sandhya Mohan, Product Supervisor
As we speak, we’re thrilled to announce the secure launch of Android Studio Hedgehog 🦔 : The official IDE for constructing Android apps!
On this Android Studio launch, we now have upgraded the IntelliJ platform to 2023.1, with options designed to enhance app efficiency and battery life, make it simpler to improve purposes to the most recent Android model, and make it quicker to develop utilizing Jetpack Compose. Learn on to be taught extra about how Android Studio Hedgehog can assist supercharge your developer productiveness.
App efficiency
Android vitals in App High quality Insights
Along with serving to you examine crash experiences for apps instrumented with the Firebase Crashlytics SDK, App High quality Insights now additionally contains Android vitals knowledge from Google Play Console. With Android vitals, you possibly can see crash experiences for any app you publish to the Google Play Retailer with out requiring further instrumentation in your app. You may view Android vitals points, filter them, and see crash insights from Play to rapidly perceive and resolve the reason for a crash, and bounce from stack hint to code all from the App High quality Insights software window. Be taught extra.
Observe: If you do not have permission to view your app within the Play Console, request that the app admin share read-only entry to solely app high quality info, by clicking Customers and permissions > View app high quality info (read-only) within the Play Console.
Energy Profiler
The brand new Energy Profiler exhibits energy consumption on gadgets. It segments the facility consumption info by subsystems known as “Energy Rails”. This helps you visualize the correlation between energy consumed and the actions occurring in your app. This method of instantly measuring energy consumption differs from the legacy Vitality Profiler, which solely used a mannequin to estimate power consumption.
By understanding this info, you possibly can probably establish and repair energy consumption points in your app by working A/B checks to match the facility consumption of various algorithms, options and even totally different variations of your app.
Apps that are optimized for decrease energy consumption result in an improved battery and thermal efficiency, finally resulting in an improved finish person expertise. Energy Rails knowledge is out there on Pixel 6+ gadgets working Android 10+.
Coding productiveness
Goal Android 14 utilizing Android SDK Improve Assistant
The SDK Improve Assistant gives a step-by-step wizard stream to assist builders by means of targetSdkVersion upgrades. It pulls documentation instantly into the IDE, saving you effort and time.
Android Studio Hedgehog provides assist for upgrading initiatives to Android 14 (API Degree 34). We’ve additionally added further relevance filters in order that pointless steps are eliminated — and in some circumstances, the improve assistant will pinpoint precisely the place in code the adjustments should be made.
New UI updates
Within the Giraffe launch, we launched a brand new UI for the IDE. This reimagined theme reduces visible complexity and gives simpler entry to important options, leading to a extra fashionable and clear appear and feel. We’ve listened to your suggestions and, in Hedgehog, we’ve added updates for compact mode, vertical and horizontal splitting, and mission tabs for Mac OS. When you’ve got not but tried the brand new UI, we encourage you to take action.
Machine mirroring
Now you can mirror your bodily Android machine within the Working Units window in Android Studio. Whereas mirroring your machine’s show instantly through ADB over USB or Wi-FI to Android Studio, you possibly can execute frequent actions comparable to beginning and interacting with apps, rotating the display, folding and unfolding the cellphone, altering the amount, and extra – instantly from inside Android Studio. Be taught extra.
Embedded Format Inspector
You now have the choice to run the Format Inspector instantly within the Working Units software window whereas working your app on an embedded digital machine or mirrored bodily machine. This opt-in characteristic considerably improves efficiency of Format Inspector, conserves display actual property, helps manage your UI debugging workflow in a single software window, and improves pace whereas inspecting your structure. In embedded mode, you possibly can present a view hierarchy, examine the properties of every view, navigate to code utilizing “deep examine” mode, and entry different frequent Format Inspector options. Allow it by means of Settings > Experimental > Format Inspector
Stay Edit up to date handbook mode shortcut
Stay Edit has a new default shortcut for handbook mode for: Management+ (Command+ for macOS). Guide mode is useful in conditions the place you wish to have exact management over when updates are deployed to the working software. For extra info, see the video clip in Stay Edit for Jetpack Compose.
Compose instruments
Compose Preview’s Gallery Mode
Gallery mode is a brand new mode in Compose Preview that allows you to give attention to one Preview at a time to preserve rendering sources. Use Gallery mode when iterating on UI and change to different modes (Grid or Listing) when that you must see UI variants.
Compose State info in Debugger
When setting a breakpoint on a Composable perform, the debugger now lists the parameters of the composable and their state, so you possibly can extra simply establish what adjustments might need induced sudden recompositions.
Compose Multipreview templates
Android Studio Hedgehog contains assist for the most recent annotations added by the Compose Multipreview API, permitting builders to render frequent structure eventualities side-by-side whereas working with the Compose Preview.
The brand new annotations added embody: @PreviewScreenSizes, @PreviewFontScales, @PreviewLightDark, and @PreviewDynamicColors
Construct instruments
New macro to specify JDK path
A brand new macro, #GRADLE_LOCAL_JAVA_HOME, makes it safer and simpler to specify the Java* dwelling path used for the Gradle daemon (background course of) execution in your mission by referencing your .gradle/config.properties file. This reduces errors associated to incompatible Gradle and mission JDK variations, since there may be now a single supply of fact in your Gradle JDK choice.
Beginning with Android Studio Hedgehog, new initiatives will use #GRADLE_LOCAL_JAVA_HOME by default. Present initiatives will robotically be migrated to the brand new macro after a profitable sync, except you are already utilizing a macro like #JAVA_HOME.
[Windows-only] Decrease the influence of antivirus software program on construct pace
The Construct Analyzer informs customers if antivirus software program could also be impacting construct efficiency. This could happen if antivirus software program, comparable to Home windows Defender, is performing real-time scanning of directories utilized by Gradle. Construct Analyzer recommends an inventory of directories to exclude from energetic scanning, and, if potential, gives a hyperlink so as to add them to the Home windows Defender folder exclusion checklist.
Use Firebase Check Lab gadgets with Gradle Managed Units
Gradle Managed Units can now goal Firebase Check Lab gadgets, and you may put it to use to run your automated checks at scale. Use Gradle Managed Units to pick out from a variety vary of each bodily and digital FTL gadgets, with assist for take a look at sharding for accelerated execution time. To make use of FTL gadgets, you want Android Gradle Plugin 8.2 with the most recent Alpha model of the Firebase Check Lab Gradle plugin. Be taught extra.
Obtain Android Studio at the moment!
Now’s the time to obtain Android Studio Hedgehog to include the brand new options into your workflow. As at all times, we respect any suggestions on stuff you like, points, or options you wish to see. If you happen to discover a difficulty, please verify the recognized points and file a bug if wanted. Bear in mind to additionally observe us on X (previously often known as Twitter), Medium, or YouTube for extra Android growth updates!
*Java is a trademark or registered trademark of Oracle and/or its associates.