Android Studio 3.6 was recently released. Among other things, view binding and a new packaging tool have been added to the IDE.

To prevent Android developers from wasting their time with broken code, the team behind the project introduced the concept of view binding in the current release. Null pointers and class exceptions should be a thing of the past in the new version, because compile-time safety is applied when referring to views in the code.

This is possible because binding classes are generated for each XML layout file in a module. That module can be used to access a view. Bound views in the binding class use their corresponding type, thus avoiding incorrect casting.

Because finding memory leaks in a program can be quite a challenge, Android Studio’s memory profiler now has the ability to detect potentially leaking activity and fragment instances. The feature, requested by many developers, can be activated by checking the appropriate checkbox when waking up with a heap dump.

Devs who would like to publish their build artifacts to an Apache Maven repository can now do so thanks to the newly included support for the Maven Publish Gradle plugin. Furthermore, Adroid Studio now uses Zipflinger as the standard packaging tool for debug builds. In addition, users of the Kotlin programming language are now able to use Android NDK features. This allows them to create automatic stub-implementation functions for JNI declarations and find the implementation that matches a particular JNI declaration.

New testing features

There is also news regarding testing: Android Emulator has been updated. This made it possible for the Android Studio team to extend the extended controls menu with an embedded Google Maps UI. The new addition helps to save and resend certain points as virtual locations. It also helps with route generation. In addition, there is now (preliminary) support for multiple displays, so that multi-display setups can be tested better.

Finally, a feature has been added that allows developers of Android apps to see their design and code side by side, with a split view. Further enhancements should help apply color sources, resume interrupted downloads, and reimport MOT files when a change is detected.