保存信息如下
在inflate布局文件的时候会报错,layout种只有一个ChatLayout,去掉即可以正常渲染显示
报错信息:
android.view.InflateException: Binary XML file line #32: Binary XML file line #32: Error inflating class com.tencent.qcloud.tim.uikit.modules.chat.ChatLayout
Caused by: android.view.InflateException: Binary XML file line #32: Error inflating class com.tencent.qcloud.tim.uikit.modules.chat.ChatLayout
Caused by: java.lang.reflect.InvocationTargetException
布局文件:
<?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">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/message_container"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.tencent.qcloud.tim.uikit.modules.chat.ChatLayout
android:id="@+id/chat_layout"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>
相似问题