Reputation: 13708
I could easily set dataBinding
in buld.gradle.kts
by doing:
dataBinding {
isEnabled = true
}
But I could not seem to find the equivalent for viewBinding
.
Upvotes: 2
Views: 4469
Reputation: 76
As viewBinding.isEnabled
is going to be deprecated, using buildFeatures would be better.
android {
...
buildFeatures {
viewBinding = true
}
}
Upvotes: 5
Reputation: 81578
android {
viewBinding {
isEnabled = true
}
}
With Android Gradle Plugin 3.6.0 or newer, with Android Studio 3.6.0 or newer, and with Android Build Tools newer than 3.6.0 (classpath("com.android.tools.build:gradle:3.6.0")
Upvotes: 1
Reputation: 1033
You need to be on Android Studio 3.6 and add :
android {
viewBinding.isEnabled = true
}
Update :
You also need your gradle plugin to be at least on 3.6.0
Upvotes: 4