1// Android Studio 4.0
2android {
3 buildFeatures {
4 viewBinding = true
5 }
6}
1// Adding this to your build.gradle (Module level)
2
3plugins {
4 id 'com.android.application'
5 id 'kotlin-android'
6 //Added:
7 id 'kotlin-kapt'
8 id 'kotlin-android-extensions'
9}
10
11
12// And having this in your layout
13<Button
14 android:id="@+id/btn_finish"
15 (...)
16
17// You ca use this in the .kt file
18btn_finish.setOnClickListener {
19 // Do Something
20}