The original link: developer. The android. Google. Cn/studio/rele…

Android Studio Bumblebee as a new major release update, which contains many new features and improvements.

Support for KMP test execution

You can now run and test with Kotlin Multiplatform (KMP) in Android Studio Bumblebee.

To ensure that KMP tests run successfully in Android Studio, make sure that the project meets all of the following requirements:

  • AGP 7.0.0- Alpha08 or higher
  • Gradle 6.8.2 or higher
  • Kotlin plugin version 1.4.30 or later

New device manager

Device Manager as a replacement for AVD manager, some new features have been introduced to make it easier to create and manage all local test devices, such as:

  • The new UI supports floating or separate Windows docked to the IDE, just like with other Android Studio tool Windows, making it easier for developers to access their devices without interfering with other IDE Windows.
  • The Virtual TAB makes it easier for developers to create, manage, and deploy emulators. It also makes it easier to see the details of each Device and quickly check devices in Device File Explorer with one click.
  • The Physical TAB helps developers quickly pair new devices with ADB Wifi, making it easier to see details about each Physical Device, and you can quickly check each Device’s File system with the click of a button using Device File Explorer.

To open the new Device Manager, do one of the following:

  • In Android Studio Welcome, choose More Actions > Virtual Device Manager.

Note: Virtual devices can only be created and managed from the Welcome page at this time.

  • After opening the project, choose View > Tool Windows > Device Manager from the main menu bar.

New features in Layout Inspector

Take a layout hierarchy snapshot

Layout Inspector now supports saving a snapshot of the Layout hierarchy of a running application, making it easier for developers to share this content with others.

When using the Layout Inspector, you can see the data captured in the snapshot, including the detailed 3D render Layout, component tree for View, Compose, or hybrid Layout, and detailed properties for each component of the UI.

To save the snapshot, perform the following operations:

    1. Run applications to devices with API level 23 or higher.
    1. Open Layout Inspector by selecting View > Tool Windows > Layout Inspector.
    1. The Layout Inspector automatically connects to the application. If not, select the application from the drop-down menu.
    1. When you want to capture a snapshot, click the **Export Snapshot ** in the Layout Inspector toolbar.

    1. In the dialog box that appears, specify the name and location where you want to save the snapshot, using*.liThe extension saves the file.

You can then load the Layout Inspector snapshot by selecting File > Open from the main menu bar and opening the *.li File.

Support for checking the Compose semantics

In Compose, semantics are a framework for the Accessibility service to understand and test, and a way to describe the UI.

In Android Studio Bumblebee, you can now use the Layout Inspector to check for semantic information in the Compose Layout.

When selecting the Compose node, use the Attributes window to check whether it declares semantic information directly or incorporates semantics from its children.

To quickly identify which nodes contain Semantics, select the View Options drop-down menu in the Component Tree window and select Highlight Semantics Layers. You can then use the keyboard to quickly navigate between them.

Avoid Activity restarts

Connecting the Layout Inspector to a running application in older Versions of Android Studio causes the application’s Activity to restart.

In Android Studio Bumblebee, you can avoid restarting your Activity while connecting to the Layout Inspector by setting flags in advance using one of the following steps:

  • Enable the run configuration option

    1. Select Run > Edit Configurations from the main menu bar. The Run/Debug Configurations dialog box appears.
    2. Select the run configuration to use.
    3. In the Layout Inspector options section, check the box next to Connect to Layout Inspector Without Restarting Activity.
    4. Run this configuration the next time you want to use Layout Inspector to check your application.
  • Set flags from the command line:

    1. Open the command line terminal on the connected device.
    2. Use the following command to set the device flag for your application:
    adb shell settings put global debug_view_attributes_application_package <my_package_name>
    Copy the code
    1. Run the application on the device and connect to the Layout Inspector, which Android Studio checks to see if flags are set and to avoid restarting the Activity as much as possible.

Note: Although it is usually not obvious, setting this device flag can affect application performance when the layout inspector is not in use.

Document Layout Inspector snapshot

The new Version of Android Studio can now capture a snapshot of an application’s layout hierarchy for later saving, sharing, or inspection.

Using the Layout Inspector, you can see the detailed 3D rendered Layout, component tree for View, Compose, or hybrid Layout, as well as the detailed properties of each component of the UI.

To check the real-time application layout, click Export Snapshot on the Layout inspector toolbar and save the snapshot with the extension *.li. You can then load the Layout Inspector snapshot by selecting File > Open from the main menu bar to Open the *. Li File.

The snapshot is displayed in a TAB in the editor window so that you can easily compare it to a running application.

Apply the new feature in check

In Android Studio Bumblebee, there are new tools and features in the App Inspection window, You can open the App Inspector by selecting View > Tool Windows > App Inspection from the main menu bar.

Network Inspector

The Network Profiler in the Profilers tool window has now been moved to the App Inspection tool window.

If you’ve used Network Profiler before, the same functionality is still available, just run the application on a device with API level 26 or higher and open the App Inspector > Network Inspector TAB.

Inspect Jobs, Alarms and Wakelocks

In addition to the existing Worker support, the Background Task Inspector now supports checking the Jobs, Alarms, and Wakelocks of the application.

Each type of asynchronous Task is now displayed under its appropriate heading on the Inspector TAB, making it easy to monitor its status and progress. Similar to Workers, you can check its Details by selecting Job, Alarm, or Wakelock in the Task Details panel.

Note: This feature has been migrated from the Energy Profiler, so you should now use the Background Task Inspector to check all asynchronous tasks in your application.

Since the Worker uses Jobs and Wakelocks in the background, the tasks scheduled by the Worker will be displayed as sub-items of each Worker. Please remember that Workers can only be seen in Graph mode.

Wireless debugging

Android Studio Bumblebee supports wireless debugging on Android 11 and later devices.

Pair and allow applications from Android Studio over Wi-Fi, without using a USB cable or using the command line to manage Android ADB connections.

To use this feature, select the Pair Devices Using Wi-Fi option from the Device selection menu, then select the QR code or Pair PIN code, and on Android 11 and later devices, Find Wireless Debugging under Developer Options and use Android Studio to wirelessly initialize and connect to an ADB session.

Learn more about wireless debugging Settings in Connecting to a Device over Wi-Fi (Android 11+).

Compose Interactive Preview is enabled by default

Interactive Preview is enabled by default starting with Android Studio Bumblebee, which allows you to interact with the preview as if it were already running on the device.

Interactive Preview is isolated from other previews in the sandbox environment, requiring you to click on elements and enter user actions in the preview.

The Preview Interactive mode runs directly in Android Studio without running the emulator, which leads to some limitations:

  • No network access.
  • No file access permission.
  • Some context apis may not be fully available.

Animated Vector Drawable (AVD) preview

The vector animator provides the ability to preview animations. This tool helps developers preview

,

, and

resources in Android Studio and makes it easier to optimize custom animations.


Non-transitive R classes are enabled by default

The non-transitive R class is now enabled by default, and you can now use the non-transitive R class with the Android Gradle plugin to build faster builds for applications with multiple modules.

This helps prevent resource duplication and ensures that each module’s R class contains only references to its own resources and does not extract references from its dependencies, which avoids problems such as compilation conflicts.

Migrate to non-transitive R Classes Refactor > Migrate to non-transitive R Classes.

Apple Silicon supports updates

For macOS users on Apple Silicon (ARM64) hardware, Android Studio Arctic Fox and Android Emulator have supported the new architecture since last year.

But in this release, we now update the Android SDK platform tools v32.0.0 (including ADB and Fastboot) and build tools v32.1.0 (including AAPT) to generic binaries, This eliminates the need for The Rosetta binary translator to run Android developer tools.

For details, see the SDK tool release notes.

Updated device Picker for Design Tools

To make it easier to target a wide variety of Android devices, we’ve updated device selectors in the Design Tools window, such as layout editor and layout validation, to reflect the popular dimensions of each device’s external dimensions from the reference device.

From phones to tablets, Wear devices to Android TV, it’s now easier to preview, validate, or edit layouts on the screen size of each meaningful physical device.