Android Developers Blog: Android Studio Electric Eel
Posted by Paris Hsu, Product Manager, Android Developer
|Android Studio Electric Eel splash screen|
Today, we are ⚡️electrified⚡️ to announce the latest stable release of the official IDE for building Android applications: Android Studio Electric Eel (2022.1.1)!
|Compose Preview updates automatically|
|Compose Preview Device Spec|
|Layout Inspector recomposition rendering highlights|
Visual Linting for Views: New for XML layouts, Visual linting now runs in the background to check for issues across different form factors, detecting problems such as overlapping or non-visible elements on a given device configuration.
For example, in the animated screen capture below, you can see that the layout file has two validation problems: a TextView covered by an ImageView on certain screen sizes and an ImageView, which is partially out-of-bounds in some configurations. Clicking on the problem in the Problems panel will open the Layout Validation panel to see your layouts rendered for the various device sizes and highlight the configurations with the selected issue.
|Visual Linting for Views|
|Universal Problems Panel|
Build & Dependencies
Download impact in Build Analyzer: The Build Analyzer tool provides you insight into what happens during your builds. This now includes a summary of any dependency downloads that happened. You can use this information to determine the impact of downloads on your build, and to spot problems such as downloads happening during incremental builds.
The information of the download impact is broken down by repositories, so you can see where each dependency was downloaded from. You can also see if a repository takes a long time to serve artifacts, or has a high number of failed requests. If that’s the case, you should consider removing the repository, if possible, or moving it lower in your repository configuration, so that other repositories take priority over it.
|Download impact in Build Analyzer|
|Upgrade Assistant post-upgrade report and rollback support|
|SDK Index integration|
Baseline Profile fix for App Bundles: Under certain circumstances Baseline Profiles could have been compressed when the app was built as an Android App Bundle. This resulted in the profile not being picked up when installing the app locally. In this local only scenario, benchmark results would be slower than anticipated. The bundletool version shipping with Electric Eel addresses and fixes this problem.
All-new Logcat: Logcat has been rewritten from the ground up to make it easier to parse, query, and track logs. The new Logcat UI has been available to try as an opt-in feature in Dolphin, and it’s now enabled by default in Electric Eel, including a number of quality-of-life and stability fixes. Some highlights include better formatting for logs, a smarter search field with autocomplete support to filter for the logs you want to see, ability to persist log output across app restarts, and options to customize what’s displayed.
|Logcat New UI|
|App Quality Insights window|
Emulators & devices
New “Desktop” category & Desktop AVD: In Electric Eel, you now have the option to create a Desktop emulator. This lets you test how your app behaves on devices such as Chromebooks. There are a handful of interactions that are different on these devices that you should test with your app. For example, apps can be freeform resized or minimized, which your app should handle gracefully.
|Testing apps on new Desktop AVDs|
Resizable Emulator (Experimental): The Resizable emulator helps you test your app on different screen sizes without having to run multiple emulators. After creating and launching a resizable emulator, you can use the Display Mode menu to switch between different reference device sizes and see how your app behaves.
|Using the Resizable Emulator|
Physical Devices Mirroring (Experimental, Opt-in): You can now mirror your physical device to Android Studio and interact with it similarly to how you’d use an emulator. This is an opt-in feature in Electric Eel so that you can share feedback with us. In order to use it, you need to first go to Preference > Experimental > Device Mirroring to enable it. Then, connect your physical device through ADB (either through wired or wireless), and it will show up in the Running Devices panel. Once mirrored, you can interact with it much like you’re used to with emulators, such as multi-touch, physical buttons, and device rotation. Mouse and keyboard events are forwarded, and you can use the controls on the toolbar to input button presses, or to rotate the device.
You can also drag and drop files onto the mirrored device (just like on an emulator). If the file is an APK, it will be installed, which can be really useful for quickly testing a build. For other file types, the file will be copied to the device’s Download folder.
|Physical Devices Mirroring (Android Studio and Physical Deice)|
IntelliJ Platform Update – Android Studio Electric Eel (2022.1.1) includes the IntelliJ 2022.1 platform release, which has many new features such as Dependency Analyzer to facilitate dependency management and conflict resolution and the Notifications tool window that offers a new, streamlined way to receive notifications from the IDE. It also includes a number of other notable improvements that are covered here.
To recap, Android Studio Electric Eel (2022.1.1) includes these new enhancements & features:
- Compose Preview updates automatically
- Compose Preview device spec
- Layout Inspector recomposition rendering highlights
- Visual Linting
- Universal Problems panel
Build & dependencies
- Improved Sync performance with parallel project imports
- Download impact in Build Analyzer
- Upgrade Assistant post-upgrade report and rollback support
- SDK Index integration
- Baseline Profile fix for App Bundles
Emulators & devices
- New “Desktop” category & Desktop AVD
- Resizable Emulator (Experimental)
- Physical Devices Mirroring (Experimental, Opt-in)
- IntelliJ Platform 2022.1 Update
Check out the Android Studio release notes, Android Gradle plugin release notes, and the Android Emulator release notes for more details.
Download Studio Today!
It is a good time to download Android Studio Electric Eel (2022.1.1) to incorporate the new features into your workflow. As always, we appreciate any feedback on things you like and issues or features you would like to see. If you find a bug or issue, please file an issue and also check out known-issues. Remember to also follow us on Twitter, Medium, or YouTube for more Android Development updates!