How To Enable Kotlin Android Extensions By Default In Android Studio 4.1
Why kotlin-android-extensions not enabled by default in this latest version of Android Studio? In fact, as long as i know, i have to manually add the plugin in gradle files. Any wo
Solution 1:
In Kotlin 1.4.20-M2 JetBrains deprecated Kotlin Android Extensions compiler plugin.
kotlinx.android.synthetic is no longer a recommended practice. Removing in favour of explicit findViewById
Very sad news :(, i hate viewBinding
Solution 2:
In this commit you can see the message:
Replaced kotlinx synthetic with findViewById
kotlinx.android.synthetic is no longer a recommended practice. Removing in favour of explicit findViewById.
It says that it is no longer recommended, but that doesn't mean that you should not use it. They are providing guidelines, but you can choose what to use and what not.
Other alternatives:
findViewById
- View Binding
Solution 3:
kotlin-android-extensions
is deprecated, you must use view binding
Solution 4:
Android studio 4.1 do not support to import kotlin extension
Post a Comment for "How To Enable Kotlin Android Extensions By Default In Android Studio 4.1"