首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >即时通信IM-安卓-引入聊天界面ui-报错?

即时通信IM-安卓-引入聊天界面ui-报错?

提问于 2021-03-05 08:38:59
回答 2关注 1查看 489

保存信息如下

在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

布局文件:

代码语言:javascript
复制
<?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>

回答

和开发者交流更多问题细节吧,去 写回答
相关文章

相似问题

相关问答用户
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档