What's new in Android Studio Electric Eel | 2022.1.1?

What's new in Android Studio Electric Eel | 2022.1.1?

Android Studio is the official IDE for Android development, and includes everything you need to build Android apps.

This page lists new features and improvements in the latest version in the stable channel, Android Studio Electric Eel.

Resizable emulator:

You can now test your app on multiple screen sizes and with a single resizable emulator. Testing on a single resizable emulator not only allows you to rapidly test changes across different interfaces, but also promotes a smoother development experience by saving the compute resources and memory that would be required to maintain separate virtual devices.

No alt text provided for this image

Visual linting for Views:

Android Studio now automatically runs your layout to check for visual lint issues across different screen sizes for layouts written in Views. When you open?Layout Validation, you can see all your layouts render in multiple device sizes. If there's an issue, it appears in the?Problems?panel, which is designed to show all issues within design tools.

No alt text provided for this image

Device mirroring:

You can now mirror your device in the?Running Devices?window in Android Studio Electric Eel. By streaming your device's display directly to Android Studio, you can execute common actions such rotating the screen, changing the volume, or locking/unlocking the device right from the IDE itself.

To turn it on manually, navigate to?File?>?Settings?>?Experimental?(Android Studio?>?Preferences?>?Experimental?on a Mac), and check the box next to?Device Mirroring.

No alt text provided for this image

To get started, ensure you are connected to a device. All devices that you are connected to are mirrored in tabs in the?Running Devices?window, which you can open by navigating to?View?>?Tool Windows?>?Running Devices. When you deploy an app or test to a connected device, the?Running Devices?window appears automatically and shows the mirrored device.

No alt text provided for this image

App Quality Insights from Firebase Crashlytics:

Starting with Android Studio Electric Eel, you can see and act on app crash data from Firebase Crashlytics directly in the IDE. This integration pulls stack trace data and crash statistics from Crashlytics into the new?App Quality Insights?tool window in the IDE, so you don't have to jump back and forth between your browser and the IDE. Development teams can benefit from key capabilities including the following:

  • See lines in your code highlighted when they have related Crashlytics event data.
  • See the stack trace for top crashes and click on the stack trace to jump to the relevant lines in your code.
  • See summary statistics about top crash and non-fatal events, for example grouped by device manufacturer and Android version.
  • Filter events by severity, time, and app version.
  • Get a browser link that opens the Crashlytics dashboard page with more details about the event.

With the Android Studio and Crashlytics integration, you can write code and address top crash issues all in the same spot. This enriched development experience helps you stay informed about your app's performance and minimize disruptions for your users. If you encounter any issues with this feature,?file a bug.

If you're not using Crashlytics yet and would like to learn more about its offerings, see?Firebase Crashlytics.

Navigate Crashlytics data in Android Studio:

The?App Quality Insights?tool window has rich data that gives you insight into the events your users are encountering, and links to help you quickly navigate to the sources of those events.

No alt text provided for this image

  1. If your project includes multiple app modules, make sure the module you want to see event data for is selected from the module dropdown menu.
  2. Use the application ID dropdown menu to select the app ID you want to analyze. For example, while you might work on the debug version of your app in the IDE, you might want to see event data for your production version of your app that your users install.
  3. The?Issues?panel shows the top events that Crashlytics has data for, and is sorted by your most impactful crashes.
  4. The?Sample Stack Trace?panel shows details about the latest occurrence of the event you click on in the?Issues?panel. You can see the event's stack trace and click on the stack trace to jump to the relevant lines in your code base.
  5. There is also information about the device type affected, its Android version, and the time the event occurred, as well a link to the event in the Firebase Crashlytics dashboard. The dashboard is useful if you want to dive deeper and inspect additional stack traces, trends, and custom logs.
  6. The?Details?panel breaks down the crash counts by device type and Android version, so you can determine which user groups are most affected. It also shows which app version(s) experienced the crash and the number of users affected.
  7. Use the severity filters to select or deselect events that are Fatal??or Non-Fatal?.
  8. Use the time range and app version filters to hone in on certain subsets of events.

In addition to being able to navigate from stack trace to code, you can also jump from code to stack trace: Android Studio now highlights lines of code that are related to crashes so you can easily spot and debug them.

No alt text provided for this image

When you hover over a highlighted line of code, a pop-up appears that shows the event involved, its frequency, and the number of devices affected. You can click on?Open in App Quality Insights?to jump to the event details in the?App Quality Insights?tool window.?

Updates to Logcat:

No alt text provided for this image

In Android Studio Electric Eel, the new version of Logcat is enabled by default to make it easier to parse, query, and keep track of logs.?

Desktop Android Virtual Device now available:

You can now test how your app works on desktop devices such as Chromebooks by using a Desktop Android Virtual Device (AVD). Users often interact with apps differently on large screen devices, and the Desktop AVD enables you to see how your app behaves in this environment. Here are some of the unique functionalities you can test:

  • App resizing: resize your app by dragging the window edges.
  • Freeform window management: place your app in various places on the desktop screen, and minimize, maximize, and restore the app window.
  • Notifications: check that the notifications render correctly when pulled up from the system tray on the desktop.

No alt text provided for this image

Check download impact using Build Analyzer:

Build Analyzer now provides a summary of time spent downloading dependencies and a detailed view of downloads per repository. You can use this information to determine whether unexpected dependency downloads are negatively impacting your build performance. This is especially important during incremental builds, which shouldn't consistently download artifacts.

Specifically, you can use this information to identify configuration issues, such as use of dynamic versions of dependencies that cause unexpected downloads. Also, if you see a high number of failed requests for a specific repository, it could indicate that the repository should be removed or moved lower in your repository configuration.

Layout Inspector recomposition rendering highlights:

In Android Studio Electric Eel, your recompositions are highlighted to help you determine where in the UI your composables are recomposing. The highlighted portion shows a gradient overlay of the composable in the image section of the Layout Inspector, and gradually disappears so that you can get an idea of where in the UI the composable with the highest recompositions can be found. If one composable is recomposing at a higher rate than another composable, then the first composable receives a stronger gradient overlay color.

No alt text provided for this image

Universal Problems panel:

You can now view all the issues for your design tools in a shared issue panel. To view the tool window, navigate to?View?>?Tool Windows?>?Problems.

No alt text provided for this image

Live updates to your Compose Preview:

Starting with Android Studio Electric Eel, you can see immediate updates to your Preview changes as you make them.?

No alt text provided for this image

Use Compose Preview with different devices:

In Android Studio Electric Eel, you can edit the?device?parameter of the Preview annotation to define configurations for your Composables in different devices.

No alt text provided for this image

Android Gradle plugin and Android Studio compatibility:

The Android Studio build system is based on Gradle, and the Android Gradle plugin adds several features that are specific to building Android apps. The following table lists which version of the Android Gradle plugin is required for each version of Android Studio.

If your project is not supported by a specific version of Android Studio, you can still open and update your project using an?older version of Android Studio.

要查看或添加评论,请登录

Muhammad Yaseen的更多文章

社区洞察

其他会员也浏览了