At its I/O 2016 developer conference, Google today launched Android Studio 2.2 preview, the latest version of its integrated development environment (IDE). You can download the new version for Windows, Mac, and Linux now directly from the Canary page. If you are already using Android Studio, you can check for Canary updates in the navigation menu (Help => Check for Update on Windows/Linux and Android Studio => Check for Updates on OS X).
Google released Android Studio 2.1 just three weeks ago, so this preview is coming very soon out of the pipe. And yet Stephanie Cuthbertson, Google product manager for Android, showed a long list of features that 2.2 brings to the table:
- Layout Editor: This new user interface designer lets you drag and drop widgets from the palette to the design surface or the component tree view of your app and offers a blueprint mode to inspect the spacing and arrangement of your layout, a Properties panel for quick widget edits, and an UI builder for editing menu and system preference files.
- Constraint Layout: This flexible layout manager allows you to create dynamic user interfaces without nesting multiple layouts. It is distributed as a support library tightly coupled with Android Studio and backwards compatible to API Level 9. The built-in templates in the New Project Wizard now generate a Constraint Layout but you can also click on any layout in the new Layout Editor and select the Convert to ConstraintLayout option.
- Layout Inspector: Drill into the view hierarchy of your app and analyze the attributes of each component of UI on the screen. Android Studio creates a snapshot of the current view hierarchy of your app for you to inspect, which is particularly useful when trying to track down a bug.
- Firebase Plugin: You can add Firebase to a new or existing Android app with the new Assistant window, and access Firebase features right in the IDE (Tools => Firebase). Many of the Firebase services that Google detailed today can be added via a guided experience, Cuthbertson said.
- Samples Browser: This menu option allows you to find Google-provided Android code samples based on the currently highlighted symbol in your project. Highlight Variables, Types, or Methods in your code and then right-click, choose Find Sample Code, and you’ll see the results in a bottom output box.
- CMake and NDK-Build: If you’re using the Android NDK, you can now build CMake and NDK-Build Android app projects by pointing Gradle at your existing build files.
- Improved Jack Tools: Incremental build and full support for annotation processing has been added, so you can explore using Java 8 features in your existing projects.
- Merged Manifest Viewer: Navigate to your AndroidManifest.xml and click on the new Merged Manifest bottom tab to see how each node of your AndroidManifest resolves with various project dependencies.
- Espresso Test Recorder: Creating tests is now as easy as using your app. Run your app in debug mode and enable recording, and this feature will capture UI events and convert them into Espresso Tests that you can run locally or even in the Firebase Test lab.
- APK Analyzer: Understand the contents and the sizes of different components in your APK, avoid 64K referenced method limit issues with your Dex files, diagnose ProGuard configuration issues, view merged AndroidManifest.xml file, and inspect the compiled resources file. This feature can help you reduce your APK size (you’ll see both the raw file size as well as the download size of various components), which Cuthbertson noted is particularly useful when developing for emerging markets.
On stage, Cuthbertson also shared that 94 percent of the top 125 apps and games in Google Play now use Android Studio. Not bad for an IDE that only launched back in December 2014.