致命异常:android.content.res.Resources $ NotFoundException资源ID#0x7f0d005c-Android

时间:2019-03-17 10:30:15

标签: android android-drawable

我有波纹管xml

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/relativeListItemMessage"
    android:layout_width="match_parent"
    android:layout_height="100dp"
    android:layout_gravity="right"
    android:gravity="right">

    <TextView
        android:id="@+id/txtCountMessages"
        android:layout_width="30dp"
        android:layout_height="30dp"
        android:layout_alignParentLeft="true"
        android:layout_marginLeft="10dp"
        android:layout_marginTop="10dp"
        android:background="@drawable/circle_textview_drawable"
        android:gravity="center" />

    <TextView
        android:id="@+id/txtTitleMessage"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentRight="true"
        android:layout_margin="10dp"
        android:layout_toRightOf="@+id/txtCountMessages"
        android:gravity="right" />

    <TextView
        android:id="@+id/txtSummeryDesc"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_below="@+id/txtTitleMessage"
        android:layout_alignParentRight="true"
        android:layout_margin="10dp"
        android:ellipsize="marquee"
        android:gravity="right"
        android:singleLine="true" />

</RelativeLayout>

但是在某些设备上(例如SM-G532F_6.0.1),我在fireBase下崩溃了:

Fatal Exception: android.content.res.Resources$NotFoundException
Resource ID #0x7f0d005c

这是我的circle_textview_drawable.xml

<shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="oval">
    <solid android:color="#ff0000" />
    <stroke
        android:width="0dp"
        android:color="#ff0000" />
    <corners android:radius="10dp" />
</shape>

0 个答案:

没有答案