Android Studio 2.3 Improves 'Instant Run' Functionality
The latest edition of the free Android Studio IDE for creating mobile apps with Java continues to build upon the Instant Run functionality for quicker builds of incremental code changes.
Instant Run, first introduced in the 2.0 preview in 2015, gets a UI overhaul in the new Android Studio 2.3, now available for download.
Designed to quicken the repetitive coding/testing/debugging lifecycle, Instant Run kicks in the first time a developer clicks Run or Debug, subsequently providing a new lightning bolt icon that triggers Apply Changes functionality to try to enact code changes in a running app.
Wojtek Kaliciński demonstrated the Instant Run overhaul in a video published last week.
"The first thing I'd like to mention is the overhaul of the Instant Run UI," Kaliciński said. "We followed advice from developers and now provide two buttons: Run, which you will use to deploy and start your app, and Apply Changes, for any subsequent code and resource modifications.
"This uses Instant Run to quickly update the running app using cold, warm or hot swap, and now requires a device or emulator running Lollipop and above. In case you happen to see any unexpected problems, you can always use the Run button again to force a full app restart."
In a blog post, Android product manager Jamal Eason provided more details on the changes to Instant Run, some of which were made under the hood and aren't readily observable.
"As a part of our focus on quality, we have made some significant changes to Instant Run in Android Studio 2.3 to make the feature more reliable," Eason said. "The Run action will now always cause an application restart to reflect changes in your code that may require a restart, and the new Apply Changes action will attempt to swap the code while your app keeps running. The underlying implementation has changed significantly to improve on reliability, and we have also eliminated the startup lag for Instant Run enabled apps."
More information on the improved Instant Run, such as requirements needed to make it work, is available in the documentation. Google developer advocate Reto Meier also provided an extensive look at the feature in a post last year, exhaustively exploring the nuts-and-bolts "magic" behind the feature.
Apart from the Instant Run revamp and some other new features, Eason said the new 2.3 version focused most on quality improvements.
Some of those other "what's new" features detailed by Eason include improvements to capabilities in design functionality, development and test.
Some new features were introduced by an update to the underlying IntelliJ IDEA platform, upon which Android Studio is built. For example, IntelliJ 2016.2 release provides enhancements including an updated inspection window and a notifications system.
Full details of all the changes are available in the release notes.
David Ramel is the editor of Visual Studio Magazine.