我的应用程序在一些主要在kitkat版本上运行的设备崩溃。错误如下
E/UncaughtException: android.view.InflateException: Binary XML file line #16: Error inflating class <unknown>
我的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>
<import type="android.view.View"/>
<variable
name="chatsViewModel"
type="com.sukshi.sukshichat.viewmodel.ChatsViewModel" />
</data>
<RelativeLayout
android:id="@+id/ln_item_row"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="1dp"
android:background="@drawable/bg_selectable"
android:gravity="center"
android:onClick="@{chatsViewModel::onItemClick}"
android:orientation="horizontal"
android:padding="@dimen/activity_horizontal_margin"
android:visibility="@{chatsViewModel.sender ? View.GONE : View.VISIBLE}">
<de.hdodenhof.circleimageview.CircleImageView
android:id="@+id/iv_user_photo"
style="@style/AppTheme.CircleImgList"
app:civ_border_color="@color/circle_iv_border"
app:civ_border_width="1dp"
app:photoUrl="@{chatsViewModel.photoUrl}"
tools:src="@drawable/ic_person"/>
<TextView
android:id="@+id/tv_user_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_toEndOf="@+id/iv_user_photo"
android:layout_toLeftOf="@+id/iv_status_indicator"
android:layout_toRightOf="@+id/iv_user_photo"
android:layout_toStartOf="@+id/iv_status_indicator"
android:text="@{chatsViewModel.name}"
android:textSize="@dimen/item_user_name_text_size"
android:textStyle="bold"
tools:text="TRR"/>
<ImageView
android:id="@+id/iv_status_indicator"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:src="@drawable/statusbar_chat"/>
</RelativeLayout>
</layout>
过去两天我一直试图修复。我尝试删除&#34; android:src&#34;对于imageviews思考可能错误是因为图像文件,但没有用。我不知道自己做错了什么。有人可以看看吗?感谢