I know this is not something new to ask but as I am in need to add data binding in java(generated) package and I haven't used it before in any of my previous projects so what I can see on the internet is to add this to my app-level build.gradle file inside the android.
dataBinding {
enabled = true
}
but it is not working and the error what I am getting is
[databinding] {"msg":"No class attribute for \u0027view\u0027 node","file":"C:\\Users\\pc\\Desktop\\Astrotell Project\\AstrotellUserApp\\app\\src\\main\\res\\layout\\fragment_resetpassword.xml","pos":[]}
I do not understand the meaning of this and also my fragment_resetoassword is like this
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".fragments.Resetpassword">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<ScrollView
android:id="@+id/sv_fg_reset_"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/bg">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/bg"
android:layout_marginStart="50dp"
android:layout_marginEnd="50dp"
android:layout_marginTop="40dp">
<RelativeLayout
android:layout_width="40dp"
android:layout_height="40dp"
android:id="@+id/rl_fg_reset_backarrowLayout">
<ImageView
android:id="@+id/iv_fg_reset_back"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_centerInParent="true"
android:src="@drawable/back_black"/>
</RelativeLayout>
<RelativeLayout
android:id="@+id/rl_fg_resrt_logo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="40dp"
android:background="@drawable/circular_logo"
android:backgroundTint="@color/colorOrange2"/>
<com.kookyapps.astrotelluserapp.CustomViews.PoppinsBoldTextView
android:id="@+id/tv_fg_reset_resetText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="40dp"
android:layout_below="@+id/rl_fg_resrt_logo"
android:textSize="21sp"
android:text="@string/resetPasswordTitle"
android:textColor="@color/colorBlack2"/>
<com.kookyapps.astrotelluserapp.CustomViews.PopinsRegularTextView
android:id="@+id/tv_fg_reset_enterText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/tv_fg_reset_resetText"
android:textSize="12sp"
android:text="@string/enterdetails"
android:textColor="@color/grey2" />
<RelativeLayout
android:id="@+id/rl_fg_reset_newpassLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="40dp"
android:layout_below="@+id/tv_fg_reset_enterText">
<ImageView
android:id="@+id/iv_fg_reset_newpass"
android:layout_width="20dp"
android:layout_height="20dp"
android:src="@drawable/lock_deselect"/>
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/et_fg_reset_newpass"
android:layout_toRightOf="@+id/iv_fg_reset_newpass"
android:layout_marginLeft="10dp"
android:hint="@string/newpass"
android:background="@android:color/transparent"/>
<ImageView
android:layout_width="20dp"
android:layout_height="20dp"
android:id="@+id/iv_fg_reset_eye"
android:src="@drawable/eye_deselect"
android:layout_marginRight="20dp"
android:layout_alignParentRight="true"/>
</RelativeLayout>
<view
android:layout_width="match_parent"
android:layout_height="2dp"
android:id="@+id/v_fg_reset_newpass"
android:layout_below="@+id/rl_fg_reset_newpassLayout"/>
<RelativeLayout
android:id="@+id/rl_fg_reset_confirmpassLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:layout_below="@+id/rl_fg_reset_newpassLayout">
<ImageView
android:id="@+id/iv_fg_reset_confirmpass"
android:layout_width="20dp"
android:layout_height="20dp"
android:src="@drawable/lock_deselect"/>
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/et_fg_reset_confirmpass"
android:layout_toRightOf="@+id/iv_fg_reset_confirmpass"
android:layout_marginLeft="10dp"
android:hint="@string/confirmpass"
android:background="@android:color/transparent"/>
<ImageView
android:layout_width="20dp"
android:layout_height="20dp"
android:id="@+id/iv_fg_reset_eye_confirmpass"
android:src="@drawable/eye_deselect"
android:layout_marginRight="20dp"
android:layout_alignParentRight="true"/>
</RelativeLayout>
<view
android:layout_width="match_parent"
android:layout_height="2dp"
android:id="@+id/v_fg_reset_confirmpass"
android:layout_below="@+id/rl_fg_reset_confirmpassLayout"/>
<RelativeLayout
android:id="@+id/rl_fg_reset_resetbtn"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="20dp"
android:background="@drawable/button_bg"
android:layout_below="@+id/rl_fg_reset_confirmpassLayout">
<com.kookyapps.astrotelluserapp.CustomViews.PopinsRegularTextView
android:id="@+id/tv_fg_reset_resetPassText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/reset"
android:layout_centerInParent="true"
android:textColor="@color/colorWhite"
android:textStyle="bold"/>
</RelativeLayout>
</RelativeLayout>
</ScrollView>
I need to import data binding in my fragment class but I don't have any idea how will I do it, I have searched on https://developer.android.com/topic/libraries/data-binding and https://github.com/curioustechizen/android-ago/issues/28 there is one more I searched and found How to use data-binding with Fragment but in my case, if I write this class It does not find this library. So I have tried these yet I didn't find any solution to resolve my problem if someone could genuinely help me then I would be grateful to him.