Posted by Adarsh Fernando, Product Supervisor, Android
The Android Studio group has been abuzz with the secure launch of Android Studio Bumblebee (2021.1.1) 🐝 and Android Gradle plugin (AGP) 7.1.0; the most recent variations of Android official IDE and construct system. We’ve improved performance throughout a broad space of the standard developer workflow: Construct and Deploy, Profiling and Inspection, and Design.
Some notable additions embrace a unified check execution between Android Studio and your steady integration (CI) server ✅, handy pairing flows to help ADB over Wi-Fi 📲, Improved Profiler instruments that will help you establish and analyze jank in your app 🕵️, and new methods to preview animations 🎥 and UI interactions with out deploying your app to a tool.
As all the time, this launch wouldn’t be doable with out the early suggestions from our Preview customers. So learn on or watch beneath for additional highlights and new options you could find on this secure model. When you’re prepared to leap in and see for your self, head over to the official web site to obtain Android Studio Bumblebee (2021.1.1).
What’s in Android Studio Bumblebee (2021.1.1)
Under is a full listing of recent options in Android Studio Bumblebee (2021.1.1), organized by the three main themes.
Construct and Deploy
- New System Supervisor: This new device window in Bumblebee makes it simpler to see and handle your digital and bodily check units, and you may open it by choosing View > Software Home windows > System Supervisor from the primary menu bar. Within the Digital tab, create a brand new system, evaluation system particulars, delete a tool, or anything you used to do from the now eliminated AVD Supervisor. Within the Bodily tab, shortly pair to a brand new system utilizing ADB Wi-Fi and see particulars of every bodily system at a look, or shortly examine every system’s file system utilizing the System File Explorer with a click on of a button. Be taught extra concerning the New System Supervisor within the launch notes.
System Supervisor
- ADB over Wi-Fi: Bumblebee features a simplified move to connect with your Android 11 and better units over Wi-Fi for deployment and debugging utilizing ADB. After you allow debugging over Wi-Fi in your system, choose the Pair utilizing Wi-Fi motion within the Bodily tab of the brand new System Supervisor to open the pairing wizard. Then comply with the steps offered to pair to a tool linked over the identical community. Be taught extra.
Pairing a tool with ADB over Wifi
- Run Instrumented Exams in Android Studio utilizing Gradle: Have you ever ever run assessments in Android Studio with completely different outcomes than the identical assessments working in your CI? This is usually a irritating problem that results in misplaced productiveness. To resolve this problem, we’ve launched a brand new check runner to Android Gradle plugin (AGP) 7.1.0 that Android Studio Bumblebee makes use of by default when working instrumentation assessments, so all of your assessments run by means of a unified check runner. It is a related enchancment to Android Studio Arctic Fox, the place we began working all unit assessments through Gradle by default. And, equally, this enchancment doesn’t require you to alter the way you write or run your assessments!
Utilizing completely different runners result in inconsistent outcomes
Android Studio now runs instrumentation assessments through Gradle
- Android Gradle Plugin Improve Assistant now updates API utilization: Initially launched in Android Studio 4.2, the AGP Improve Assistant helped customers replace their tasks to the most recent model, and enhancements in Arctic Fox offered a brand new UI with the power to evaluation and choose the improve model and steps. In Bumblebee, the Improve Assistant now additionally checks for and affords to replace your DSL that will help you keep away from utilizing deprecated APIs earlier than they’re deleted. For extra info see the Android Gradle Plugin DSL/API migration timeline.
- Non-Transitive R courses on for brand spanking new tasks: Android Studio Arctic Fox launched new refactoring instruments that will help you use non-transitive R courses to allow sooner builds for functions with a number of modules. When creating new tasks utilizing Bumblebee, the IDE configures your venture to make use of non-transitive R courses, by default. Whereas this does carry efficiency enhancements, you now need to consult with R courses by their correct package deal identify, and never by the package deal names of their mum or dad modules, as they are going to not resolve transitively. For extra info see Use non-transitive R courses.
- Emulator device window enabled by default: Launched in Android Studio 4.1, the Emulator launches inside an Android Studio device window and lets you deploy and work together with digital Android units whereas absolutely remaining throughout the context of the IDE. The adjustments advertisements an improved UX for prolonged controls and snapshot administration. For extra info see Run the Android Emulator instantly in Android Studio.
- Apple Silicon Help Replace – For these utilizing macOS on Apple Silicon (arm64) {hardware}, Android Studio Arctic Fox and the Android Emulator have supported this new structure since final 12 months. Nonetheless, with this launch, we now have now up to date the Android SDK platform instruments v32.0.0 (which incorporates ADB and fastboot) and construct instruments v32.1.0 (which incorporates aapt) to be common binaries in order that your Android developer instruments not want the Rosetta binary translator to run. Based mostly on group suggestions, these builders on this {hardware} platform have seen notable efficiency enhancements. See launch notes.
Profile and Examine
- Jank detection observe in Profilers: When profiling your app utilizing units working Android 11 (API stage 30) or greater, the CPU profiler now reveals a brand new group of tracks that illustrate the phases of every body underneath Body Lifecycle: Utility, Look forward to GPU, Composition and Frames on show. Every observe labels the frames with a body quantity and color-codes the rectangle to make it straightforward so that you can visualize the place a specific body is in its lifecycle, together with guides you possibly can toggle to match with Vsync occasions. You should use this information to know the place Jank may happen in your app and examine the foundation causes. Within the Evaluation panel, there may be now a Frames tab, which conveniently summarizes rendering info for all frames. For extra info, see UI jank detection.
Detailed body lifecycle info within the CPU Profiler
- Profileable app profiling help in Studio Profilers: When profiling your app, it’s vital to generate correct information with the model of your app that the majority intently resembles what your customers will set up. To take action, now you can embrace the
<profileable>
property in your app’s manifest to profile apps that aren’t debuggable, as proven beneath.<profileable android:shell="true"/>
Profileable is a manifest configuration launched in Android 10, and is obtainable for CPU and Reminiscence profiling duties. Utilizing the profileable flag as an alternative of the debuggable flag has the important thing benefit of decrease overhead for efficiency measurement; nonetheless, sure profiling options will not be accessible for Profileable builds, such because the Occasion timeline, API initiated CPU profiling, heap dumps, or dwell location recordings. For extra info, see Profileable functions.
- Examine Jobs, Alarms, and Wakelocks: The Background Job Inspector has been expanded to mean you can examine Jobs, Alarms, and Wakelocks. You possibly can see dwell info on how these background duties are being scheduled, and see detailed details about their execution, much like how one can examine Staff. Moreover, when inspecting Staff, you possibly can observe and examine Jobs that your Staff schedule for you. When you used to make use of the Vitality Profiler in earlier variations of the IDE, you need to now navigate to View > Software Home windows > App Inspection from the menu bar and choose the Background Job Inspector to examine Jobs, Alarms, and Wakelocks.
Examine Jobs, Alarms, and Wakelocks within the Background Job Inspector
- Community Inspection: The Community Profiler has now migrated to the App Inspection device window, to permit for a lighter-weight expertise for inspecting community site visitors in your app. The feel and appear of the Community Profiler has been maintained and works with any debuggable app on units working API stage 26 and better. To make use of the brand new inspector, choose View > Software Home windows > App Inspection from the menu bar and choose the Community Inspector. For extra info, see Examine community site visitors with the Community Inspector.
- Seize Format Inspector snapshots: Now you can seize snapshots of your app’s structure hierarchy to avoid wasting, share, or examine later. Snapshots seize the info you’ll usually see when utilizing the Format Inspector, together with an in depth 3D rendering of your structure, the part tree of your View, Compose, or hybrid structure, and detailed attributes for every part of your UI. When inspecting the structure of a dwell working app, click on Export snapshot from the Format Inspector toolbar and save the snapshot with an
*.li
extension. You possibly can then load a Format Inspector snapshot by choosing File > Open from the primary menu bar, and opening a*.li
file. The snapshot seems in a tab within the Editor window, with the intention to simply examine it along with your working app. Be taught extra at Seize structure hierarchy snapshots.
- Help for Compose semantics within the Format Inspector: In Compose, Semantics describe your UI in another method that’s comprehensible for Accessibility providers and for the Testing framework. In Android Studio Bumblebee, now you can use the Format Inspector to examine semantic info in your Compose layouts. When choosing a Compose node, use the Attributes window to examine whether or not it declares semantic info instantly, merges semantics from its youngsters, or each. To shortly establish which nodes embrace semantics, both declared or merged, use choose the View choices dropdown within the Element Tree window and choose Spotlight Semantics Layers.
Design
- Interactive Preview: Android Studio Arctic Fox launched with help to statically preview your composable capabilities within the Design / Break up window of the Editor. In Bumblebee, we’ve expanded performance to mean you can work together with sure elements of your Compose layouts, to validate conduct with out constructing and deploying the total app to a working system! To get began, navigate to a previewable compose perform and click on Begin Interactive Mode within the Design / Break up window. For extra info see Interactive mode.
Work together with the Compose Preview to validate conduct
- Animated Vector Drawables Preview: The Preview window is now additionally accessible when viewing vector drawables. When viewing a static drawable, you should utilize the preview window to alter background choices between “None”, “White”, “Black”, “Checkedered”, to view your drawable towards completely different situations. Animated drawables additionally present the choice to preview the animation at completely different speeds in addition to backgrounds, that will help you check animations earlier than utilizing them in your app. To be taught extra, see Animated Vector Drawables (AVD) preview.
Preview your animated vector drawables
- Up to date System picker for design instruments: To simplify designing your app for the varied variety of Android units, we’ve up to date the system picker in numerous design device home windows, reminiscent of Format Editor and Format Validation, with reference units that mirror fashionable sizes of every system kind issue. From telephones to tablets, and Put on units to Android TVs, it’s now simpler to preview, validate, or edit your structure on display sizes which are most consultant of fashionable real-world units. To be taught extra, see Change the preview look.
To recap, Android Studio Bumblebee (2021.1.1) contains these new enhancements & options:
Construct and Deploy
- Run Instrumented Exams in Android Studio utilizing Gradle
- Android Gradle Plugin Improve Assistant now updates API utilization
- Non-Transitive R courses on for brand spanking new tasks
- New System Supervisor
- ADB over Wi-Fi
- Emulator device window enabled by default
- Apple Silicon Help Replace
Profile and Examine
- Jank detection observe in Profilers
- Profileable app profiling help in Studio Profilers
- Examine Jobs, Alarms, and Wakelocks within the Background job Inspector
- Seize Format Inspector snapshots
- Help for Compose semantics within the Format Inspector
Design
- Interactive Preview
- Animated Vector Drawables Preview
- Up to date System picker for design instruments