简体   繁体   English

Drawable Image给出“找不到资源..”,但是它在文件夹中

[英]Drawable Image gives 'No resource found..' but it is in the folder

I have the below XML in slider_button.xml: 我在slider_button.xml中有以下XML:

<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:state_focused="true" 
          android:state_pressed="false" 
          android:drawable="@android:drawable/button9patch" />
    ...
</selector>

The android:drawable="@android:drawable/button9patch" gets the error: android:drawable="@android:drawable/button9patch"收到错误:

Error: No resource found that matches the given name (at 'drawable' with value '@android:drawable/button9patch'). 错误:找不到与给定名称匹配的资源(在“可绘制”处,值为“ @android:drawable / button9patch”)。

However I think I have the file in the right place (I've even put it in all the drawable folders to be sure): 但是我认为我把文件放在正确的位置(以确保确定,我什至将它放在所有可绘制的文件夹中):

在此处输入图片说明

What am I doing wrong? 我究竟做错了什么? Thanks 谢谢

像这样改变

 android:drawable="@drawable/button9patch"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM