头图

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)

    △ 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.

    △ 通过 Wi-Fi 使用 ADB 配对设备

    △ 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 现在通过 Gradle 运行插桩测试

    △ 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

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 " ".

    △ 与 Compose Preview 互动以验证行为

    △ 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!


Android开发者
404 声望2k 粉丝

Android 最新开发技术更新,包括 Kotlin、Android Studio、Jetpack 和 Android 最新系统技术特性分享。更多内容,请关注 官方 Android 开发者文档。