Sunday, October 15, 2023
HomeMobileAndroid Builders Weblog: Android Studio Electrical Eel

Android Builders Weblog: Android Studio Electrical Eel



Posted by Paris Hsu, Product Supervisor, Android Developer

Android Studio Electrical Eel splash display

At the moment, we’re ⚡️electrified⚡️ to announce the most recent steady launch of the official IDE for constructing Android functions: Android Studio Electrical Eel (2022.1.1)!

This launch contains updates and new options that cowl throughout design, construct & dependencies, emulators & gadgets, and IntelliJ. Learn or watch beneath to study extra about how they may also help you extra productively construct apps, and obtain the most recent steady model at the moment to strive it out for your self!

Design

Compose Preview updates mechanically – In earlier variations of Android Studio, you needed to manually refresh Compose Previews after making adjustments. In Electrical Eel, Previews replace mechanically after you make suitable code adjustments in the identical file, permitting you to iterate in your UI quicker. In case your code change was incompatible, Previews will present a “Wants Rebuild” standing to point needing a full construct. When your code comprises compilation errors throughout enhancing, Previews are quickly paused, after which resumed once more when the errors are fastened.
Moving image of a screenshot of Compose Preview updating automatically
Compose Preview updates mechanically
Compose Preview gadget spec – One other replace for Compose Preview is that you may now edit the gadget parameter of the Preview annotation to specify the configuration of the gadget. You may select from reference gadgets or create your individual, during which case autocomplete will assist you with what choices can be found and what values they settle for. This works collectively properly with multipreview annotations, which can be found since Dolphin.
Screenshot of Compose preview device spec
Compose Preview Machine Spec
Format Inspector recomposition rendering highlights: To make it simpler to rapidly see which of your composables are recomposing, Format inspector now highlights recomposition. This lets you establish the place within the utility the newest exercise precipitated the best adjustments in recomposition counts. The UI components with the newest adjustments are quickly overlaid with a coloration. This makes it straightforward to trace down sudden or extreme recompositions occurring in your app. You may study extra about utilizing the format inspector to debug recomposition in Jetpack Compose: Debugging Recomposition.
Moving image of screenshot showing Layout Inspector recomposition rendering highlights
Format Inspector recomposition rendering highlights

Visible Linting for Views: New for XML layouts, Visible linting now runs within the background to test for points throughout completely different type components, detecting issues akin to overlapping or non-visible components on a given gadget configuration.

For instance, within the animated display seize beneath, you may see that the format file has two validation issues: a TextView lined by an ImageView on sure display sizes and an ImageView, which is partially out-of-bounds in some configurations. Clicking on the issue within the Issues panel will open the Format Validation panel to see your layouts rendered for the varied gadget sizes and spotlight the configurations with the chosen situation.

Moving image of screenshot showing Visual Linting for Views
Visible Linting for Views
Common Issues Panel: We’ve consolidated all the issues reported by numerous instruments inside Android Studio into the brand new Issues panel. This contains visible linting, navigation, and Compose associated points.
Screenshot showing the universal problems panel
Common Issues Panel

Construct & Dependencies

Obtain influence in Construct Analyzer: The Construct Analyzer device gives you perception into what occurs throughout your builds. This now features a abstract of any dependency downloads that occurred. You should use this data to find out the influence of downloads in your construct, and to identify issues akin to downloads occurring throughout incremental builds.

The data of the obtain influence is damaged down by repositories, so you may see the place every dependency was downloaded from. You can even see if a repository takes a very long time to serve artifacts, or has a excessive variety of failed requests. If that’s the case, it is best to think about eradicating the repository, if doable, or shifting it decrease in your repository configuration, in order that different repositories take precedence over it.

Moving image of Screenshot showing the build analyzer
Obtain influence in Construct Analyzer
Improve Assistant post-upgrade report and rollback help: The Improve Assistant that helps you improve your challenge’s Android Gradle Plugin model additionally bought extra useful in Electrical Eel. After performing a model improve, the assistant will try to sync your challenge, and report whether or not it was profitable. It now additionally provides you a abstract of what steps had been executed. Furthermore, if the challenge sync fails after the improve, you need to use the brand new Revert button to undo the adjustments to your construct information.
Moving image of Screenshot showing Upgrade Assistant post-upgrade report and rollback support
Improve Assistant post-upgrade report and rollback help
SDK Index integration: We introduced Google Play SDK Index earlier this yr, which gives you details about numerous SDKs that you may combine into your app. SDK builders can mark variations of their SDKs as outdated within the SDK index, and this data is now proven straight in Android Studio.
Moving image of Screenshot showing SDK Index integration
SDK Index integration

Baseline Profile repair for App Bundles: Underneath sure circumstances Baseline Profiles may have been compressed when the app was constructed as an Android App Bundle. This resulted within the profile not being picked up when putting in the app domestically. On this native solely state of affairs, benchmark outcomes can be slower than anticipated. The bundletool model delivery with Electrical Eel addresses and fixes this drawback.

Examine

All-new Logcat: Logcat has been rewritten from the bottom as much as make it simpler to parse, question, and monitor logs. The brand new Logcat UI has been accessible to strive as an opt-in function in Dolphin, and it’s now enabled by default in Electrical Eel, together with a lot of quality-of-life and stability fixes. Some highlights embrace higher formatting for logs, a better search area with autocomplete help to filter for the logs you wish to see, potential to persist log output throughout app restarts, and choices to customise what’s displayed.

Moving image of Screenshot showing Logcat New UI
Logcat New UI
App High quality Insights window: The brand new App High quality Insights instruments allow you to browse and examine crash information from Firebase Crashlytics straight in Android Studio with out having to leap backwards and forwards between the IDE and a browser.
The IDE shows your prime points, which you’ll be able to filter to point out solely the newest crashes, or crashes from a particular model of your app. For every situation, you may see the variety of affected customers and the stack hint, which lets you rapidly navigate to the place in your code the place the crash occurred. Furthermore, you’ll see gutter icons in your supply information, which point out components of your code that present up in your app’s prime crash reviews. Merely click on on the hyperlink to navigate from the code to the crash report within the App High quality Insights window. To get began, learn the official documentation.
Moving image of Screenshot showing App Quality Insights window
App High quality Insights window

Emulators & gadgets

New “Desktop” class & Desktop AVD: In Electrical Eel, you now have the choice to create a Desktop emulator. This allows you to check how your app behaves on gadgets akin to Chromebooks. There are a handful of interactions which might be completely different on these gadgets that it is best to check together with your app. For instance, apps could be freeform resized or minimized, which your app ought to deal with gracefully.

Moving image of Screenshot showing Testing apps on new Desktop AVDs
Testing apps on new Desktop AVDs

Resizable Emulator (Experimental): The Resizable emulator helps you check your app on completely different display sizes with out having to run a number of emulators. After creating and launching a resizable emulator, you need to use the Show Mode menu to change between completely different reference gadget sizes and see how your app behaves.

Moving image of using the Resizable Emulator
Utilizing the Resizable Emulator

Bodily Units Mirroring (Experimental, Choose-in): Now you can mirror your bodily gadget to Android Studio and work together with it equally to the way you’d use an emulator. That is an opt-in function in Electrical Eel with the intention to share suggestions with us. With the intention to use it, you should first go to Choice > Experimental > Machine Mirroring to allow it. Then, join your bodily gadget via ADB (both via wired or wi-fi), and it’ll present up within the Working Units panel. As soon as mirrored, you may work together with it very like you’re used to with emulators, akin to multi-touch, bodily buttons, and gadget rotation. Mouse and keyboard occasions are forwarded, and you need to use the controls on the toolbar to enter button presses, or to rotate the gadget.

You can even drag and drop information onto the mirrored gadget (similar to on an emulator). If the file is an APK, it will likely be put in, which could be actually helpful for rapidly testing a construct. For different file sorts, the file can be copied to the gadget’s Obtain folder.

Moving image of physical devices mirroring in Android Studio
Moving image of physical devices mirroring on Physical Device
Bodily Units Mirroring (Android Studio and Bodily Deice)

IntelliJ

IntelliJ Platform Replace – Android Studio Electrical Eel (2022.1.1) contains the IntelliJ 2022.1 platform launch, which has many new options akin to Dependency Analyzer to facilitate dependency administration and battle decision and the Notifications device window that provides a brand new, streamlined strategy to obtain notifications from the IDE. It additionally contains a lot of different notable enhancements which might be lined right here.

To recap, Android Studio Electrical Eel (2022.1.1) contains these new enhancements & options:

Design

  • Compose Preview updates mechanically
  • Compose Preview gadget spec
  • Format Inspector recomposition rendering highlights
  • Visible Linting
  • Common Issues panel

Construct & dependencies

  • Improved Sync efficiency with parallel challenge imports
  • Obtain influence in Construct Analyzer
  • Improve Assistant post-upgrade report and rollback help
  • SDK Index integration
  • Baseline Profile repair for App Bundles

Emulators & gadgets

  • New “Desktop” class & Desktop AVD
  • Resizable Emulator (Experimental)
  • Bodily Units Mirroring (Experimental, Choose-in)

IntelliJ

  • IntelliJ Platform 2022.1 Replace

Take a look at the Android Studio launch notes, Android Gradle plugin launch notes, and the Android Emulator launch notes for extra particulars.

Obtain Studio At the moment!

It’s a good time to obtain Android Studio Electrical Eel (2022.1.1) to include the brand new options into your workflow. As all the time, we admire any suggestions on stuff you like and points or options you want to see. In case you discover a bug or situation, please file a problem and in addition try known-issues. Bear in mind to additionally comply with us on Twitter, Medium, or YouTube for extra Android Improvement updates!





Supply hyperlink

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments