Posted by Sandhya Mohan, Product Supervisor
In the present day, 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 newest Android model, and make it quicker to develop utilizing Jetpack Compose. Learn on to be taught extra about how Android Studio Hedgehog might help 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 consists of Android vitals knowledge from Google Play Console. With Android vitals, you may see crash experiences for any app you publish to the Google Play Retailer with out requiring further instrumentation in your app. You’ll be able to view Android vitals points, filter them, and see crash insights from Play to shortly perceive and resolve the reason for a crash, and bounce from stack hint to code all from the App High quality Insights software window. Study extra.
Word: 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 units. It segments the facility consumption info by subsystems referred to 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 may probably determine and repair energy consumption points in your app by operating A/B exams to check 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, ultimately resulting in an improved finish person expertise. Energy Rails knowledge is accessible on Pixel 6+ units operating Android 10+.
Coding productiveness
Goal Android 14 utilizing Android SDK Improve Assistant
The SDK Improve Assistant supplies 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 help 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 supplies simpler entry to important options, leading to a extra trendy and clear feel and appear. We’ve listened to your suggestions and, in Hedgehog, we’ve added updates for compact mode, vertical and horizontal splitting, and challenge tabs for Mac OS. When you have not but tried the brand new UI, we encourage you to take action.
System mirroring
Now you can mirror your bodily Android gadget within the Operating Gadgets window in Android Studio. Whereas mirroring your gadget’s show instantly through ADB over USB or Wi-FI to Android Studio, you may execute frequent actions resembling beginning and interacting with apps, rotating the display screen, folding and unfolding the cellphone, altering the amount, and extra – instantly from inside Android Studio. Study extra.
Embedded Format Inspector
You now have the choice to run the Format Inspector instantly within the Operating Gadgets software window whereas operating your app on an embedded digital gadget or mirrored bodily gadget. This opt-in function considerably improves efficiency of Format Inspector, conserves display screen actual property, helps arrange your UI debugging workflow in a single software window, and improves velocity whereas inspecting your structure. In embedded mode, you may 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
Reside Edit up to date handbook mode shortcut
Reside 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 operating utility. For extra info, see the video clip in Reside Edit for Jetpack Compose.
Compose instruments
Compose Preview’s Gallery Mode
Gallery mode is a brand new mode in Compose Preview that permits you to deal with one Preview at a time to preserve rendering assets. Use Gallery mode when iterating on UI and swap to different modes (Grid or Listing) when you must see UI variants.
Compose State info in Debugger
When setting a breakpoint on a Composable operate, the debugger now lists the parameters of the composable and their state, so you may extra simply determine what adjustments may need precipitated surprising recompositions.
Compose Multipreview templates
Android Studio Hedgehog consists of help for the newest 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* residence path used for the Gradle daemon (background course of) execution in your challenge by referencing your .gradle/config.properties file. This reduces errors associated to incompatible Gradle and challenge JDK variations, since there’s now a single supply of reality in your Gradle JDK choice.
Beginning with Android Studio Hedgehog, new initiatives will use #GRADLE_LOCAL_JAVA_HOME by default. Current 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 impression of antivirus software program on construct velocity
The Construct Analyzer informs customers if antivirus software program could also be impacting construct efficiency. This could happen if antivirus software program, resembling 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 attainable, supplies a hyperlink so as to add them to the Home windows Defender folder exclusion checklist.
Use Firebase Check Lab units with Gradle Managed Gadgets
Gradle Managed Gadgets can now goal Firebase Check Lab units, and you’ll put it to use to run your automated exams at scale. Use Gradle Managed Gadgets to pick from a variety vary of each bodily and digital FTL units, with help for take a look at sharding for accelerated execution time. To make use of FTL units, you want Android Gradle Plugin 8.2 with the newest Alpha model of the Firebase Check Lab Gradle plugin. Study extra.
Obtain Android Studio immediately!
Now’s the time to obtain Android Studio Hedgehog to include the brand new options into your workflow. As all the time, we respect any suggestions on stuff you like, points, or options you want to see. In case you discover a difficulty, please test the identified points and file a bug if wanted. Bear in mind to additionally comply with us on X (previously generally known as Twitter), Medium, or YouTube for extra Android growth updates!
*Java is a trademark or registered trademark of Oracle and/or its associates.