Author/Android Product Manager Adarsh Fernando
Just like a diligent little bee, the Android Studio team has been busy with Android Studio Bumblebee (2021.1.1) 🐝 and the stable version of Android Gradle Plugin (AGP) 7.1.0, which is the latest version of Android's official IDE and build system. . We've made improvements for many of the features involved in typical development workflows: including build and deploy , analyze and check , and design .
Some notable additions include: unified test jobs between Android Studio and your Continuous Integration (CI) server✅, easy pairing process (connect ADB via Wi-Fi 📲), improved profiling tools To help you identify and analyze stutters 🕵️ in your app, and preview animations 🎥 and interface interactions without deploying the app to the device.
As usual, this stable release would not have been possible without early feedback from preview users. Please continue reading this article or watch this video to more about the highlights and new features of this stable release. Welcome to the official website to download Android Studio Bumblebee (2021.1.1) to experience it yourself.
What's new in Android Studio Bumblebee (2021.1.1)
Below is a complete list of new features in Android Studio Bumblebee (2021.1.1) organized by three themes.
build and deploy
New Device Manager - You can more easily view and manage virtual and physical test devices with this new tool window from Bumblebee. Simply select View > Tool Windows > Device Manager from the main menu to use. From the Virtual (Virtual) tab you can create new devices, view device details, delete devices, or do anything else you did in the AVD Manager (AVD Manager, now deleted). You can use ADB Wi-Fi to quickly pair new devices and see details of each physical device at a glance in the Physical tab, or use the Device File Explorer , Quickly check the file system of each device with one click. Please go to Release Notes to learn more about the new Device Manager.
△ Device Manager
Using ADB over Wi-Fi - Bumblebee provides a simplified process to connect Android 11 and higher devices over Wi-Fi for deployment and debugging using ADB. After you have enabled to debug over Wi-Fi on your device, select in the Physical tab of the new Device Manager to Pair using Wi-Fi to Open the pairing wizard. Then follow the prompts to pair with devices connected to the same network. Please read official document for details.
△ Pairing devices using ADB via Wi-Fi
Running Instrumented Tests in Android Studio Using Gradle - Have you ever run the same test on Android Studio and CI with different results? This problem is not only disappointing, it can also lead to reduced productivity. To address this, we introduced a new test Android Gradle Plugin (AGP) 7.1.0, which by default Android Studio Bumblebee will use when running instrumented tests, so your All tests are run with the help of a unified test runner. We have provided a similar improvement in Android Studio Arctic Fox, which runs all unit tests through Gradle by default. Also, this improvement doesn't require you to change the way you write or run your tests!
△ Using different runners leads to different results
△ Android Studio now runs instrumented tests via Gradle
- Android Gradle plugin upgrade assistant now updates API usage - AGP upgrade assistant was originally introduced in Android Studio 4.2 to help users update their projects to the latest version, the updated upgrade assistant in Arctic Fox provides a new interface where users can view and select upgrade versions and steps. In Bumblebee, the upgrade assistant now also checks for and offers the option to update the DSL, helping you avoid APIs that are deprecated but not yet removed. See " Android Gradle Plugin DSL/API Migration Schedule " for details.
- Enable non-transitive R classes for new projects - Android Studio Arctic Fox introduces a new refactoring tool that helps you use non-transitive R classes to speed up building apps with multiple modules. When creating a new project with Bumblebee, the IDE configures the project to use non-transitive R classes by default. While this does improve performance, you must now refer to R classes by the correct package name instead of the parent module's package name, since R classes will no longer be resolved transitively.
- Enables the emulator tool window by default - This feature first appeared in Android Studio 4.1, allowing you to launch an emulator in the Android Studio tool window, deploy and interact with a virtual Android device, while still staying in the IDE environment. Improvements in Bumblebee include providing extended controls and better management of snapshots. For more information, see " Running Android Emulator directly in Android Studio".
- Apple Silicon Support Update - For users of macOS on Apple Silicon (arm64) hardware, this new architecture has been supported by Android Studio Arctic Fox and the Android emulator since last year. But in the stable release, we upgraded the Android SDK platform tools v32.0.0 (including ADB and fastboot) and build tools v32.1.0 (including aapt) to universal binaries so that your Android developer tools do not depend on the Rosetta binary translator run directly. Based on community feedback, developers on this hardware platform have seen significant performance improvements. Please read release note for details.
Analysis and Inspection
detection traces in - When profiling your app with a device running Android 11 (API level 30) or higher, the CPU profiler now displays a new set of traces depicting frames Frame Lifecycle The various stages of each frame under : Application, Wait for GPU, Composition, and Frames on display. Each track marks the frame with a frame number and provides different colored rectangles to distinguish it so you can easily see where a particular frame is in its life cycle, as well as guides that you can turn on or off at any time to match the Vsync events for comparison. You can use this data to understand where the freeze may occur in your app and investigate the root cause. Analysis (Analysis) A new Frames (Frames) tab page is added to the 1621eebca5a7e9 panel, which summarizes the rendering information of all frames for your convenience. For more information, see " Interface Stuck Detection ".
△ Frame Lifecycle Details in CPU Profiler
Studio profiler supports profiling profiling apps - When profiling an app, the version of the app needs to be close to the version of the app the user will install, which is important to generate accurate data. To achieve this, you can now profile a non-debuggable application by adding <profileable> attribute to the application manifest, as follows:
<profileable android:shell="true"/>
Profileable is a manifest configuration introduced in Android 10 that can be used for CPU and memory profiling tasks. Using profileable flags instead of debuggable flags can significantly reduce performance measurement overhead; however, some profiling features are not available for profileable builds, such as event timeline, CPU initiated by API Analysis, heap dumps or real-time location logging. For more information, see " Applications ".
Check Jobs, Alarms, and Wake Locks - The Background Task Inspector has been expanded to allow you to check jobs, alarms, and wake You can view real-time information about background task schedules, as well as details about their execution, in a similar way to inspecting Workers. In addition, when checking a Worker, you can track and review the jobs it has scheduled for you. If you have used the Energy Profiler in an older IDE, you can now navigate to the View > Tool Windows > App Inspection in the menu bar and select Background Task Inspector to check jobs, alarms and wakelocks.
△ Check for jobs, alarms and wakelocks in the background task inspector
- - The Network Profiler has now been migrated to Inspection tool window, allowing you to inspect network traffic in your application in a lighter-weight way. The look and feel of the network analyzer is preserved and can be used to run all debuggable applications on API level 26 and higher devices. To use the new analyzer, select View > Tool Windows > App Inspection the menu , then select Network Inspector . For more information, see " Network Traffic a Network Analyzer1621eebca5a989".
Take a Layout Inspector Snapshot - You can now take a snapshot of your app's layout hierarchy to save, share, or inspect later. Snapshots capture the data you would normally see when using the Layout Inspector, including detailed 3D rendered layouts and component trees for View, Compose, or Hybrid layouts, as well as detailed properties for each component of the interface. When examining the layout of a live running app, click in the Layout Inspector toolbar to export a snapshot and save the snapshot with the .li extension. To load the Layout Inspector snapshot, select File > Open from the main menu and open the .li file. Snapshots will appear in tabs in the editor window so you can easily compare them to a running app. For more information, see " Getting a Layout Hierarchy Snapshot ".
- Supports Compose semantics in the layout inspector - In Compose, semantics describe your interface in a way that the accessibility services and test frameworks can understand. In Android Studio Bumblebee, you can use the layout inspector to inspect the semantic information the Compose layout. When a node is selected, use the window to check whether it declares semantic information directly, or merges the semantics of its children, or both. To quickly identify which nodes contain semantics, either declarative or merged, select the Component Tree View options drop-down menu in the Component Tree window and select highlight the semantic layer Semantics Layers) .
Design
Interactive Preview - Android Studio Arctic Fox supports static preview of composable functions in the Editor Design / window. In Bumblebee, this functionality has been extended so that you can interact with certain components of the Compose layout to verify behavior without building a full app and deploying it to a running device! To start using this feature, navigate to the Compose function, then click Start Interactive Mode in the Design / Split . For more information, see " ".
△ Interact with Compose Preview to verify behavior
Animated Vector Drawable Preview - Vector drawables can now be viewed using the Preview (Preview) window. When viewing static drawables, you can set "transparent", "white", "black", "checkered" background styles for the preview window to view the drawable in different conditions. Animated drawables support previewing at different speeds and backgrounds to help you test them out before incorporating them into your app. For more information, see " Animated Vector Drawable (AVD) Preview ".
△ Preview your animated vector drawables
Design Tool's Device Selector Update - To simplify the process of designing your app for a wide variety of Android devices, we've added several design tools, such as Layout Editor and Layout Validation, in the window The device selector has been updated to provide reference devices that reflect the popular sizes for each device type. From phones to tablets, from Wear devices to Android TV, it's now easier to preview, verify, or edit layouts on screen sizes that best represent common devices today. For more information, see " Change Preview Appearance ".
A brief summary of the new optimizations and features in Android Studio Bumblebee (2021.1.1):
Build and deploy
- Running Instrumented Tests in Android Studio with Gradle
- Android Gradle Plugin Upgrade Assistant now updates API usage
- Enable non-transitive R classes for new projects
- New Device Manager
- Using ADB over Wi-Fi
- Emulator tool window enabled by default
- Apple Silicon Support Update
Analysis and Inspection
- Stutter detection trace in the profiler
- Studio profiler support for profiling profiling apps
- Check for jobs, alarms and wakelocks in the background task inspector
- Get a Layout Inspector snapshot
- Support for Compose semantics in the layout inspector
Design
- Interactive preview
- Animated vector drawable preview
- Design Tool's Device Selector Update
You are welcome to submit feedback to us, or share your favorite content and found problems. Your feedback is very important to us, thank you for your support!
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。