Android Studio 2.2 Released with Nougat Support, Layout Editor
Google yesterday bumped up its official IDE for Android development to version 2.2, adding support for the company's new mobile OS, Nougat 7.0, along with a new layout editor and many other enhancements.
After being previewed in May, the new Android Studio 2.2 was announced in a blog post by product manager Jamal Eason.
"As the official IDE for Android app development, Android Studio 2.2 includes support for all the latest developer features in Android 7.0 Nougat, like code completion to help you add Android platform features like Multi-Window support, Quick Settings API, or the redesigned Notifications, and of course, the built-in Android Emulator to test them all out," Eason said.
Eason described more than 20 new features that affect all phases of Android Studio workflow: design, develop, build and test.
In the actual coding department, C++ becomes more of a first-class citizen, with improved functionality (CMake or ndk-build) for project compilation. Android Studio uses CMake for new projects by default, but it also supports ndk-build for existing projects. "Migrating projects from CMake build systems to Android Studio is now seamless," Eason said. "You will also find C++ support in the new project wizard in Android Studio, plus a number of bug fixes to the C++ edit and debug experience."
Also in the development category, it's now easier to leverage Android sample code in projects. That feature lets developers import code samples from GitHub from an Android Studio menu or download complete samples. Now, developers can just access those code snippets from within the editor by highlighting a variable, type or method and right-clicking to display a context menu with a Find Sample Code item.
Under design, a new UI designer -- or layout editor in Android-speak -- features the addition of a blueprint mode and a properties panel used to tweak widgets' visual properties. "The new layout designer also drew its share of oohs and aahs from the crowd", ADTmag's John K. Waters reported from the I/O 2016 conference in May when version 2.2 was previewed. "Designing the UI for an Android app can be challenging, given the variety of screen sizes and resolutions the developer must accommodate. The rewritten designer calculates the screen positioning and sizing (constraints), which means the UIs can resize automatically for different screens."
Along with the new layout editor is a new layout, called Constraint Layout, that facilitates dynamic UIs without having to resort to nested layouts.
Several enhancements were also announced for the build process, including improved Instant Run functionality, which is a "major, long-term investment to make Android development as fast and lightweight." The feature is now more stable and reliable, said Eason, who invited coders who previously disabled the feature to re-enable it and try it out.
A new APK Analyzer provides a peek into the inner structure of APK (Android application package) project files. "Easily inspect the contents of your APKs to understand the size contribution of each component," Eason said. "This feature can be helpful when debugging multi-dex issues. Plus, with the APK Analyzer you can compare two versions of an APK." Also, an experimental Build cache has been added in an attempt to speed up builds.
Several test-related features were also announced, including: virtual sensors in the Android Emulator to test features such as Accelerometer, Ambient Temperature, Magnetometer and so on; a beta version of Espresso Test Recorder that lets developers record app interactions to create UI tests; and a GPU Debugger, also in beta, that lets developers "capture a stream of OpenGL ES commands on your Android device and then replay it from inside Android Studio for analysis."
Other highlights of version 2.2 include:
- Android Studio now comes bundled with OpenJDK 8. Existing projects still use the JDK specified in File > Project Structure > SDK Location. Developers can switch to use the new bundled JDK by clicking File > Project Structure > SDK Location and checking the Use embedded JDK checkbox.
- New Layout Inspector lets coders examine snapshots of your layout hierarchy while your app is running on the emulator or a device.
- New Assistant window to help programmers integrate Firebase services into your app.
- New Merged Manifest Viewer to help developers diagnose how a manifest file merges with an app dependencies across project build variants.
- The Run window now contains log messages for the current running app. Note that developers can configure the logcat Monitor display, but not the Run window.
- The Debugger tab of the Android App and Android Tests templates now contain several new options for debugging with LLDB.
- The Profiling tab of the Android App and Android Tests templates now contain a Capture GPU Commands option for enabling GPU tracing. GPU traces can be displayed in the GPU Debugger (a beta feature).
- The Android Tests template now has a Firebase Test Lab Device Matrix option for the Deployment Target.
- The Native Application template has been deprecated. If this template is used in a project, Android Studio automatically converts it to the Android App template.
- Improved performance for Gradle sync within the IDE, especially for large projects.
- Improved build times for both full and incremental builds with new app packaging code.
- Improved Jack compiler performance and features, including support for annotation processors and dexing in process.
A full accounting of all the new features in Android Studio 2.2 can be found in the Release Notes.
"Today 92 percent of the top 125 apps and game developers on Google Play, plus millions of developers worldwide, use Android Studio," Google said in May. "We want to continue to build features that will continue to make you more efficient when developing for Android and more productive."
Android Studio 2.2 can be downloaded here.
David Ramel is an editor and writer for Converge360.