I got this error in the generated BindingImpl class but the binding class is not final, it is abstract...
BindingImpl class :
public class FragmentImageBindingImpl extends FragmentImageBinding implements com.example.memoriserlesnombres.generated.callback.OnClickListener.Listener {
...
}
Binding class:
public abstract class FragmentImageBinding extends ViewDataBinding {
...
}
Any ideas ?
I already try to clean/rebuilt project, invalidate caches/restart and reinstall android studio without success. I saw another post saying to delete plugin files but they don't exist.
I'm new to android, but it seems very buggy to me :/
EDIT : I still have the error (in the class) but my app works fine, so I think I can ignore it, this is just an Android Studio issue.
Here is the xml :
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools">
<data>
<variable
name="view"
type="com.example.memoriserlesnombres.image.ImageViewModel" />
</data>
<androidx.coordinatorlayout.widget.CoordinatorLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".image.ImageFragment">
<TextView
android:id="@+id/current_number"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{Integer.toString(view.currentNumber)}"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/current_number">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/associated_image"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/hint"
android:text="@={view.image}" />
</com.google.android.material.textfield.TextInputLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end|bottom"
android:layout_margin="16dp"
android:contentDescription="@string/save_image"
android:onClick="@{() -> view.saveImage()}"
app:srcCompat="@drawable/ic_done_black_24dp" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>
</layout>
