Fixed Error can not find symbol class in data binding

This is tutorial to fix Error cannot find symbol class in Data Binding in Android Studio 4.0 with code to resolve binding class not generated android with latest Androidx Jetpack.
Many times developer implement data binding in project and find errors like cannot find symbol class activitymainbinding impl in android or activitymainbinding not found in android or warning of activitymainbinding in android.
At the time of MVVM implementation with data binding, gives error can't resolve android databinding class or can't import ActivityMainBinding or error cannot resolve symbol ActivityMainBinding in Activity or Fragment.
if Activity name is MainActivity and layout file name is activity_main.xml, ActivityMainBinding class auotmatically generated in Android Studio 4.0 but many times gives erro activitymainbinding not generated, this video tutorial will help you.
if your gradle version is upgraded than 4.0.0 then dataBinding enabled=true will gives warning like DSL element 'android.dataBinding.enabled' is obsolete and has been replaced with 'android.buildFeatures.dataBinding', to resolve this warning you need to use buildFeatures { dataBinding = true } in build.gradle file, that is explained in this YouTube video tutorial of Android app development.

#data-binding #mvvm #android