java.lang.IllegalStateException: DataBindingUtil.inflate<ViewDataBinding>(...) must not be null while trying to inflate using DataBindingUtil
Okay, so i found the issue. Turns out even if u configured almost every setting properly you might forget/miss out on this little info. So, i'll share what i learnt here.
Data binding layout files are slightly different and start with a root tag of <layout>
followed by a data element and a view root element. As mentioned in detail here: Official Databinding Documentation
So wrapping all your layouts with <layout></layout>
will remedy this exception.
e.g:
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
....
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>