For those, accepted answer didn't work and by any change you are using the android Data Binding then this kind of error may come if some of the attributes are present twice in parent tag as well as child tag. In below example the android:layout_width="match_parent" android:layout_height="wrap_content" are used twice in parent as well as in child.
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<data>
<variable
name="pdpDescriptionViewModel"
type="com.tottus.ui.productdescription.model.PdpDescriptionViewModel" />
</data>
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content">
</LinearLayout>
</layout>
to solve this remove duplicate attribute from the parent or child and it should work.
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<data>
<variable
name="pdpDescriptionViewModel"
type="com.tottus.ui.productdescription.model.PdpDescriptionViewModel" />
</data>
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content">
</LinearLayout>
</layout>
layout_below.