Yesterday, Google announced the stable release of Android Studio 3.2 with a variety of new features and improvements. This version comes with 20+ features including Android App Bundle, Energy Profiler, and Android Emulator Snapshots.
What’s new in Android Studio 3.2
Android App Bundle
With Android App Bundle, the new app publishing format, you can deliver smaller APKs to your users and reduce the download size of your app. Once Google Play has your app bundle, it uses an app serving model named Dynamic Delivery. This serving model processes your app bundle to generate and serve optimized APKs for each user’s device configuration.
This eliminates your efforts of building, signing, and managing multiple APKs to support different devices, and users get smaller, more optimized downloads. Android Studio 3.2 provides you a CLI, using which you can easily build your code as an app bundle.
Battery life is one of the key concerns of users, so it is important to check the energy consumption done by your app. Energy Profiler helps you find where your app is using more energy than necessary.
With the Energy Profiler, you can visualize the estimated energy usage of system components, plus inspect background events that may lead to battery drainage. To use it, ensure you are connected to an Android device or emulator running Android 8.0 Oreo (API 26) or higher.
Slices are UI templates that can be used to display rich, dynamic, and interactive content from your app in the Google Search suggestions and Google Assistant. Built-in templates are available, to help you extend your app with the new Slice Provider APIs.
You can also do lint checks to ensure that you’re following best practices when constructing the Slices. To start constructing your Slices, right-click on your project folder, and navigate to New | Other | Slice Provider.
You can now add sample data to a TextView, an ImageView, or a RecyclerView from within the Layout Editor. This will make it easier for you to visualize the look and feel of a layout while designing your app.
‘What’s New’ assistant
This newly added assistant panel automatically informs developers about the latest changes in the IDE. You can also open the panel by navigating to Help | What’s New in Android Studio.
AndroidX Refactoring Support
You can now add the Android extension (AndroidX) libraries in a new project by adding the following line in your gradle.properties file:
To help you migrate your project to the new namespace and dependencies, Android Studio 3.2 provides you a new built-in refactoring action. Also, the Android Studio build system will automatically convert any Maven dependencies that have not migrated to the AndroidX namespace. With Android Studio 3.2 and higher, you can quickly migrate an existing project to use AndroidX by selecting Refactor > Migrate to AndroidX from the menu bar.
IntelliJ Platform and Kotlin update
Android Studio 3.2 comes with IntelliJ 2018.1.6 platform release and Kotlin 1.2.61. Many improvements to dataflow analysis, debugging, new inspections, have been added to this release of IntelliJ. Kotlin 1.2.61 provides support for the Kotlin-friendly Android 9 Pie SDK.
With the latest Android Emulator, you can create a snapshot of the current state of your emulator and boot up and switch into any snapshot in under 2 seconds. In Android Studio 3.2, Android Snapshots are even faster to save and load due to underlying speed enhancements.
Using Android snapshots you can pre-configure an Android Virtual Device (AVD) with the presets, apps, data, and settings that you want in-place, and repeatedly go back to the same snapshot.
Microsoft Hyper-V and AMD processor support
Google has finally addressed this long-standing user request from the Android developer community. Now you can run the Android Emulator on Windows 10 computers that have Hyper-V enabled while Intel HAXM remains the default hypervisor. Support for AMD processor is added to provide developers hardware-accelerated performance.
Screen Record in Android Emulator
With the new screen recording feature in the Android Emulator, you can now perform screen and audio recording on any Android API and save this recording to a WebM or animated GIF file. You can enable this feature via the Android Emulator Extended Controls panel, command line, or from Android Studio.
These were few of the features that they have added, and there are more to explore. You can find the full list at Android Developer Blog.