Ошибка: «android.view.InflateException: строка двоичного файла XML № 7: строка двоичного файла XML № 7: ошибка надувания класса <unknown>» - PullRequest
0 голосов
/ 15 октября 2019

При работе с 4.7 WXGA API 23 я получаю сообщение об ошибке «android.view.InflateException: строка двоичного файла XML № 7: строка двоичного файла XML № 7: ошибка раздувания класса»

, но вболее высокие версии, все работает хорошо, я добавил код и макет xml для своей проблемы, не понимаю, почему это происходит, поэтому

Код, где происходит эта ошибка

@NonNull
@Override
public PostsHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
    View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.post_list_layout,
            parent, false);
    return new PostsHolder(v);
}

XML-макет для реселлера. Item

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:orientation="vertical" android:layout_width="match_parent"
    android:layout_height="wrap_content"
    >
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        android:layout_marginBottom="10dp"
        android:layout_marginLeft="10dp"
        android:layout_marginRight="10dp"
        android:layout_marginTop="10dp"
        android:background="@drawable/shadow_300_50"

        >
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="1dp"
            android:padding="5dp"
            android:orientation="horizontal"
            >
            <de.hdodenhof.circleimageview.CircleImageView
                android:layout_width="60dp"
                android:layout_height="60dp"
                android:src="@drawable/profile"
                android:id="@+id/post_user_profile_image"
                android:scaleType="centerCrop"
                android:layout_marginLeft="4dp"
                />
            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="vertical"

                >
<RelativeLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content">

    <TextView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="Username"
        android:id="@+id/post_item_username"
        android:layout_marginLeft="5dp"
        android:layout_marginTop="8dp"
        android:textAlignment="textStart"
        android:textSize="16sp"
        android:textStyle="bold"
        android:textColor="@android:color/black"/>


    <TextView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="Time"
        android:id="@+id/post_item_time"
        android:layout_marginLeft="257dp"
        android:layout_marginRight="5dp"
        android:layout_marginTop="8dp"
        android:textAlignment="textStart"

        android:textSize="16sp"
        android:textStyle="bold"
        android:textColor="@android:color/black"/>
</RelativeLayout>

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="Title"
                    android:id="@+id/post_item_title"
                    android:layout_marginLeft="5dp"
                    android:layout_marginTop="5dp"
                    android:textAlignment="textStart"
                    android:textSize="16sp"
                    android:textStyle="bold"
                    android:textColor="@android:color/black"/>
                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:orientation="horizontal"
                    android:layout_marginLeft="5dp"
                    android:padding="2dp">
                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="post_item_Category"
                        android:textColor="@color/colorPrimaryDark"
                        android:textSize="13sp"
                        android:textStyle="bold"
                        android:id="@+id/post_item_Category"/>
                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="Post_item_SpinnerC"
                        android:textColor="@color/colorPrimaryDark"
                        android:textSize="13sp"
                        android:id="@+id/post_item_SpinnerC"
                        android:layout_marginLeft="7dp"/>



                </LinearLayout>


            </LinearLayout>

        </LinearLayout>


        <TextView
            android:id="@+id/post_item_description"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginLeft="70dp"
            android:layout_marginRight="3dp"
            android:padding="3dp"

            android:text="Post Description"
            android:textColor="@android:color/black"
            android:textSize="14dp" />

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal"
            android:layout_marginLeft="10dp"
            android:layout_marginRight="10dp"
            android:padding="2dp">

            <Button
                android:id="@+id/imageButton1"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="Mark"
                app:srcCompat="@drawable/ic_heart_normal"
                android:background="@drawable/button"/>

            <Button
                android:id="@+id/commenting_button"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginLeft="140dp"
                android:text="Comment"
                android:background="@drawable/button"/>


        </LinearLayout>
    </LinearLayout>

</RelativeLayout>
...