Android 安卓:不';在某些情况下,我们无法识别styleable

Android 安卓:不';在某些情况下,我们无法识别styleable,android,attributes,styleable,Android,Attributes,Styleable,我已经在文件attr.xml中添加了一些属性。代码如下: <?xml version="1.0" encoding="utf-8"?> <resources> <declare-styleable name="gallery_view"> <attr name="android:galleryItemBackground"/> </declare-styleable> <decla

我已经在文件
attr.xml
中添加了一些属性。代码如下:

<?xml version="1.0" encoding="utf-8"?>
<resources>

    <declare-styleable name="gallery_view">
        <attr name="android:galleryItemBackground"/>
    </declare-styleable>  

     <declare-styleable name="Dot">
        <attr name="color" format="color"/>
        <attr name="radius" format="dimension"/>
     </declare-styleable>

</resources>

但我不知道为什么我使用:

R.styleable.gallery\u view\u android\u galleryItemBackground
:无错误

R.styleable.Dot_color
将注意到错误,因为无法在R文件中看到此字段

请帮我解决这个问题


谢谢:)

android.R.styleable类及其字段已从公共API中删除,请检查:抱歉,但在我的第一个案例中,我仍然可以使用它。请给我解释一下。谢谢:)你能再解释一下吗。但是,我在尝试获取
R.styleable.DOT
,int[]时仍然会遇到相同的错误
TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.Dot);
a.getColor....