Resource is not a Drawable Resources$NotFoundException

爷,独闯天下 提交于 2020-02-03 23:42:33

问题


Getting this error since I started changing device for testing. Did some searching and none of it help because they are outdated. Any help is appreciated!

xml file

<ImageView
    android:id="@+id/loginpanel"
    android:layout_width="491px"
    android:layout_height="210dp"
    android:layout_marginStart="41dp"
    android:layout_marginTop="146dp"
    android:layout_weight="1"
    android:background="@drawable/loginpanel"

    app:layout_constraintStart_toStartOf="parent"
    app:layout_constraintTop_toTopOf="parent" />

<ImageView
    android:id="@+id/numpanel2"
    android:layout_width="388px"
    android:layout_height="452px"
    android:layout_marginStart="80dp"
    android:layout_marginTop="368dp"
    android:layout_weight="1"
    android:background="@drawable/numpanel1"
    android:alpha="0.95"
    app:layout_constraintStart_toStartOf="parent"
    app:layout_constraintTop_toTopOf="parent" />

These are my folders, there's no drawable-v24 folder


回答1:


Make sure your loginpanel and numpanel1 images is inside drawable folder not inside drawable-v24 folder

move your both images loginpanel and numpanel1 inside drawable

just copy-paste from drawable-v24 to drawable folder it will work



来源:https://stackoverflow.com/questions/57970130/resource-is-not-a-drawable-resourcesnotfoundexception

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!