error: cannot find symbol при наследовании в директории databinding
При запуске проекта возникает ошибка:
error: cannot find symbol
public class FilmItemBindingImpl extends FilmItemBinding {
^
symbol: class FilmItemBinding
Родительский класс, с которым возникла проблемма, подчёркивается, а не выделяется красным (то есть, вроде как Android Studio его видит):
Та же ситуация со всеми классами в директории databinding
Код:
package com.example.roommoviemvvm.databinding;
import com.example.roommoviemvvm.R;
import com.example.roommoviemvvm.BR;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import android.view.View;
@SuppressWarnings("unchecked")
public class FilmItemBindingImpl extends FilmItemBinding {
@Nullable
private static final androidx.databinding.ViewDataBinding.IncludedLayouts sIncludes;
@Nullable
private static final android.util.SparseIntArray sViewsWithIds;
static {
sIncludes = null;
sViewsWithIds = new android.util.SparseIntArray();
sViewsWithIds.put(R.id.contentCardFilm, 1);
sViewsWithIds.put(R.id.idFilm, 2);
sViewsWithIds.put(R.id.nameFilm, 3);
sViewsWithIds.put(R.id.categoryFilm, 4);
sViewsWithIds.put(R.id.priceFilm, 5);
sViewsWithIds.put(R.id.editFilm, 6);
sViewsWithIds.put(R.id.deleteFilm, 7);
}
// views
// variables
// values
// listeners
// Inverse Binding Event Handlers
public FilmItemBindingImpl(@Nullable androidx.databinding.DataBindingComponent bindingComponent, @NonNull View root) {
this(bindingComponent, root, mapBindings(bindingComponent, root, 8, sIncludes, sViewsWithIds));
}
private FilmItemBindingImpl(androidx.databinding.DataBindingComponent bindingComponent, View root, Object[] bindings) {
super(bindingComponent, root, 0
, (com.google.android.material.card.MaterialCardView) bindings[0]
, (androidx.appcompat.widget.AppCompatTextView) bindings[4]
, (androidx.constraintlayout.widget.ConstraintLayout) bindings[1]
, (androidx.appcompat.widget.AppCompatImageButton) bindings[7]
, (androidx.appcompat.widget.AppCompatImageButton) bindings[6]
, (androidx.appcompat.widget.AppCompatTextView) bindings[2]
, (androidx.appcompat.widget.AppCompatTextView) bindings[3]
, (androidx.appcompat.widget.AppCompatTextView) bindings[5]
);
this.cardFilm.setTag(null);
setRootTag(root);
// listeners
invalidateAll();
}
@Override
public void invalidateAll() {
synchronized(this) {
mDirtyFlags = 0x1L;
}
requestRebind();
}
@Override
public boolean hasPendingBindings() {
synchronized(this) {
if (mDirtyFlags != 0) {
return true;
}
}
return false;
}
@Override
public boolean setVariable(int variableId, @Nullable Object variable) {
boolean variableSet = true;
return variableSet;
}
@Override
protected boolean onFieldChange(int localFieldId, Object object, int fieldId) {
switch (localFieldId) {
}
return false;
}
@Override
protected void executeBindings() {
long dirtyFlags = 0;
synchronized(this) {
dirtyFlags = mDirtyFlags;
mDirtyFlags = 0;
}
// batch finished
}
// Listener Stub Implementations
// callback impls
// dirty flag
private long mDirtyFlags = 0xffffffffffffffffL;
/* flag mapping
flag 0 (0x1L): null
flag mapping end*/
//end
}
Заранее спасибо!
Ответы (1 шт):
Автор решения: Lnight
→ Ссылка
Можете попробовать File > Invalidate Caches/Restart... и выбрать Invalidate Caches and Restart. Видел подобный вопрос, тут помог этот вариант.
