我正在尝试在我的项目中实现dataBinding。添加布局标签并尝试使用变量声明数据后,android studio表示找不到我的类。我正在使用main_activity为imageView存储recyclerView和第二个xml。我想念的是什么?
main_activity.xml
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:tools="http://schemas.android.com/tools"
tools:context=".MainActivity">
<androidx.recyclerview.widget.RecyclerView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/linear_layout_with_recycleView_ID"/>
</LinearLayout>
single_picture.xml
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<data>
<variable
name="picture"
type="com.example.recycleviewpictures.Requests.Responsnes.Pictures" />
</data>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:layout_width="210dp"
android:layout_height="200dp"
android:id="@+id/single_picture_id"/>
</LinearLayout>
</layout>