18.9 Summary
Prior to the introduction of Android Studio 3.6, access to layout views from within the code of an app involved the use of either the findViewById() method or Kotlin synthetic properties. An alternative is now available in the form of view bindings. View bindings consist of classes which are automatically generated by Android Studio for each XML layout file. These classes contain bindings to each of the views in the corresponding layout, providing an alternative to synthetic properties, and a safer option to that offered by the findViewById() method. As of Android Studio 4.2, however, view bindings are not enabled by default in some project templates and additional steps are required to manually enable and configure support within each project module.