the error you’re encountering is mostly due to the deprecation and removal of Kotlin Android Extensions. As of Kotlin 1.4.20, the Kotlin Android Extensions plugin is deprecated, and its functionality has been replaced by View Binding and Data Binding.
2
Answers
based on:
https://blog.jetbrains.com/kotlin/2020/11/kotlin-1-4-20-released/
https://youtrack.jetbrains.com/issue/KTIJ-14160/AS-kotlinx.android.synthetic.main-is-unresolved-in-a-project-with-buildSrc
the error you’re encountering is mostly due to the deprecation and removal of Kotlin Android Extensions. As of Kotlin 1.4.20, the Kotlin Android Extensions plugin is deprecated, and its functionality has been replaced by View Binding and Data Binding.
You can only build this with an elder version of Kotlin, which still supported synthetics.
Else follow the instructions here: Migrate from Kotlin synthetics to Jetpack view binding.