18.4 Enabling View Binding
To use view binding, some changes must first be made to the build.gradle file for each module in which view binding is needed. In the case of the AndroidSample project, this will require a small change to the Gradle Scripts -> build.gradle (Module: AndroidSample.app) file. Load this file into the editor, locate the android section and add an entry to enable the viewBinding property as follows (note that the kotlin-android-extensions plugin will no longer be needed and may be deleted from the configuration):
plugins {
id 'com.android.application'
id 'kotlin-android'
.
.
android {
buildFeatures {
viewBinding true
}
.
.
Once this change has been made, click on the Sync Now link at the top of the editor panel, then use the Build menu to clean and then...