News

Android Studio 2.0 Preview Features Faster Emulator, Build Speeds

Google introduced a new preview of its flagship Android Studio IDE for mobile app development, addressing longstanding emulator and build speed problems.

Android Studio 2.0, introduced at the recent Android Developer Summit in Mountain View, Calif., aims to improve developer workflow with improved emulators, a new Instant Run feature and a GPU Profiler.

"In the Android Studio team, our goal is to make the IDE delightful," said exec Stephanie Cuthbertson in a keynote address at the conference. "And in order to be delightful, we felt like it had to be not just stable, but incredibly stable, and that's because as a developer, you spend hours in the IDE every day."

With recent releases of the IDE focusing on stability, the next step was speed, she said.

"We've massively accelerated build speeds," Cuthbertson said. "So in 2.0, full build -- the first time you build -- will be two to two and a half times faster than it was."

The device emulator will also see speed improvements, addressing a slowness problem that has confounded Android developers using Android Studio and its predecessor, the Eclipse IDE.

Faster Device Emulation
[Click on image for larger view.] Faster Device Emulation (source: Google)

"In the code/build/run cycle, in order to iterate, you need to be able to quickly see how the app looks as well," Cuthbertson said. "Now a lot of you guys in the community talked to us about our emulators, and here's what you said: They're not fast enough, they're not stable enough. We listened to you guys and the truth was, you were right. So we've made massive improvements here in 2.0. We have made major changes."

While the most important of these changes was the speed boost, Cuthbertson said other improvements to the emulator include a completely rewritten UI, allowing for new functionality such as screen rotation, screenshots, window zooming and drag-and-drop deployment of an .apk file to the emulator. Also, Cuthbertson said, developers can now "grab" the edge of the emulator and resize it.

Other new emulator functionality includes the ability to emulate GPS location operations, phone calls, texts, camera usage and battery state, the latter to see how apps perform with a full battery vs. a drained battery, for example.

The Instant Run feature provides another speed improvement, according to a blog post by product manager Jamal Eason. "One the most requested features we receive is to make app builds and deployment faster in Android Studio," he said. Helping to do that is Instant Run, which he said "allows you to quickly see your changes running on your device or emulator."

Code changes supported by Instant Run include adding or removing a class, changing instance method implementations or changing static method implementations. Adding, removing or changing a string resource is also supported, but require an Activity restart.

Some changes that aren't currently supported include the adding, removing or changing of annotations, instance fields, static fields and method signatures, along with several other operations. "Over the coming months, we plan to expand the Instant Run enable more change types, and continue to make your edit, build, run cycle faster," Google said in its documentation.

Another key feature in 2.0 highlighted by the Android dev team is what Culbertson described as a "very early preview of our new GPU Profiler and debugger" that helps developers working with graphics-intensive code.

"Profiling your OpenGL ES Android code is now even easier with the GPU Profiler in Android Studio," Eason said in his blog post. "The tool is in early preview, but is very powerful and not only shows details about the GL State and Commands, you can record entire sessions and walk through the GL Framebuffer and Textures as your app is running OpenGL ES Code."

As the Android Studio 2.0 preview is in the "canary" channel, featuring "bleeding edge" code changes, Google said developers might want to consider downloading the new release and running it alongside more stable versions of the IDE.

"This is just a taste of some of the bigger updates in this latest release of Android Studio," Eason said. "Over the next few weeks, we'll be showing how to take advantage of even more features in Android Studio 2.0."

In the meantime, developers are invited to try out the IDE preview and provide feedback on Google+.

About the Author

David Ramel is the editor of Visual Studio Magazine.

Featured

Most   Popular
Upcoming Events

AppTrends

Sign up for our newsletter.

Terms and Privacy Policy consent

I agree to this site's Privacy Policy.