Android Studio 3.1 released: What's new
Google has released the final stable version for Android Studio 3.1, and is available for download. The focus areas for this release are around product quality and app development productivity. In addition to many underlying quality changes, Google has added several new features into Android Studio 3.1 that developers should integrate into their development flow.
New to Android Studio 3.1 is a C++ performance profiler to help troubleshoot performance bottlenecks in your app code. For developers with a Room or SQLite database in their app, Google has added better code editor support to aid in your SQL table and query creation statements. Google has also added better lint support for the Kotlin code, and accelerated testing with an updated Android Emulator with Quick Boot.
Develop
Kotlin Lint Checks: Since announcing official Kotlin language support last year on the Android platform, Google continues to invest in Kotlin language support in Android Studio. In Android Studio 3.1, Google has enhanced the Lint code quality checks so that developers can run them via the command line as well as from the IDE. Just open an Android Studio project, and run gradlew lint via command line.
Database Code Editing: Editing inline SQL/Room Database code in Android project is now even easier with Android Studio 3.1. This release has SQL code completion in @Query declarations, better SQL statement refactoring, and SQL code navigation across projects.
IntelliJ Platform Update: Android Studio 3.1 includes the IntelliJ 2017.3.3 platform release, which has many new features such as new Kotlin language intentions and built-in support for SVG image preview.
Build
D8 Dex Compiler: D8 is now the default dex compiler in Android Studio 3.1. Replacing the legacy DX compiler, D8 dexing is an under the hood APK compilation step that makes app size smaller, enables accurate step debugging, and many times leads to faster builds. Ensure that gradle.properties either has no android.enableD8 flag, or if it does ensure that it is set to true.
New Build Output Window: Android Studio 3.1 has an updated Build output window which organises build status and errors in a new tree view. This change also consolidates the legacy Gradle output into this new window.
Test
Quick Boot: Quick Boot allows to resume an Android Emulator session in under 6 seconds. Like a physical Android device, the emulator must perform an initial cold boot, but subsequent starts are fast. The feature is enabled by default for all Android Virtual Devices. Additionally, in this release, finer grain controls of when to use Quick Boot and the ability to save the quick boot state on demand under the emulator settings page are available.
System Images and Frameless Device Skins: The latest version now supports the Google Play Store and Google APIs on API 24 (Nougat) - API 27 (Oreo) emulator systems images as well as the P Developer Preview. Additionally the device emulator skins are updated to work in a new frameless mode, which can help test apps with 18:9 screen aspect ratios, or Android P Developer Preview DisplayCutout APIs.
Optimize
C++ CPU Profiling: Last year with Android Studio 3.0, Google had launched a brand new set of Android profilers to measure the CPU, Memory, and Network Activity in apps. With Android Studio 3.1, in addition to performance profiling your Kotlin and Java language app code, one can now profile their C++ code in apps. Using simpleperf as backend, the C++ profiler allows you to record C++ method traces.
Network Profiler Updates: Threads & Network Request - To aid with analysing network traffic in apps, Google has added a new Network Thread view to inspect multithreaded network traffic, and has also added a new Network Request tab to dig into the network requests over time. With these updates to the Network Profiler developers will have additional tools to trace the network traffic from each thread and network request all the way down through the network call stack.
If you are using a previous version of Android Studio, you can upgrade to Android Studio 3.1 today or you can download the update from the official Android Studio download page.