Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error: data binding error msg:No class attribute for 'view' node

Implemented dataBinding in android but it is throwing error in compile time

XML code

<RelativeLayout
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <View
        android:layout_width="match_parent"
        android:layout_height="@dimen/sw360dp_260dp"
        android:layout_marginTop="@dimen/sw360dp_45dp"
        android:background="@drawable/apply_jobs_background_xhdpi" />

    <LinearLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_below="@id/toolbar"
        android:layout_marginStart="@dimen/sw360dp_40dp"
        android:layout_marginTop="@dimen/sw360dp_20dp"
        android:orientation="vertical">

        <TextView
            android:id="@+id/applyJobsCompanyName"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:fontFamily="@font/amarnath_regular"
            android:hint="Company Name"
            android:textColor="@color/white"
            android:textSize="@dimen/sw360dp_18sp"
            android:textStyle="bold" />
    </LinearLayout>
</RelativeLayout>

My Error

data binding error ****msg:No class attribute for 'view' node file:C:\Users\Aayush\AndroidStuidoProjects\SkillDostiJobs\app\src\main\res\layout\activity_apply_jobs.xml

like image 645
Aayush Singh Avatar asked Dec 08 '22 11:12

Aayush Singh


1 Answers

Rename view tag in XML from <view ... /> to <View ... /> or verify tag names properly.

like image 93
Aks4125 Avatar answered Dec 11 '22 12:12

Aks4125