无法解析资源@ drawable / loginbutton_selector

时间:2017-03-16 12:26:14

标签: android

我收到了这个错误。有人会知道如何解决它。我所写的全部

<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <!-- When item pressed this item will be triggered -->
    <item android:state_pressed="true"><shape android:shape="rectangle">
        <corners android:radius="3dp" />

        <solid android:color="@color/button_selectorcolor" />
    </shape></item>

    <!-- By default the background will be this item -->
    <item><shape android:shape="rectangle">
        <corners android:radius="3dp" />

        <solid android:color="@color/white_greyish" />
    </shape></item>
    <item android:state_pressed="true" android:color="@color/black"/>
    <item android:color="@color/white"></item>
</selector>

这是drawable_selector.xml文件

1 个答案:

答案 0 :(得分:0)

我在loginbutton_selector文件夹中创建了一个新的XML文件名drawable,但它确实有效。