CardView показывает серый экран в предварительном просмотре? - PullRequest
0 голосов
/ 30 марта 2019

My Cardview показывает серый экран. Могу ли я узнать, в чем причина этих проблем?

Я попытался сделать недействительным кеш и перезагрузить его, но он не работает

Это моя карта.

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_height="wrap_content">

    <android.support.v7.widget.CardView
        xmlns:card_view="http://schemas.android.com/apk/res-auto"
        android:id="@+id/card_view"
        android:layout_gravity="center"
        android:layout_width="match_parent"
        android:layout_height="200dp"
        card_view:cardCornerRadius="4dp">

        <TextView
            android:id="@+id/info_text"
            android:layout_width="match_parent"
            android:layout_height="match_parent" />
    </android.support.v7.widget.CardView>
</LinearLayout>

Это мой превью enter image description here

1 Ответ

0 голосов
/ 24 апреля 2019

Это неосторожные ошибки, на самом деле я забыл добавить реализацию 'com.android.support:cardview-v7:28.0.0' в мой gradle (приложение).

...