Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid layout error: "Resource id <res_id> is not of type STYLE (instead attr)"
    primarykey
    data
    text
    <p>I'm seeing an error I've never seen before w/ Android that's preventing some of my layout files from rendering in Eclipse. They render fine at runtime.</p> <p>The error that shows up in the graphical layout editor (and my Error log) is: "Resouce id 0x1010081 is not of type STYLE (instead attr)"</p> <p>I've searched for resource id 0x1010081 in my R files, and I can't find it so I'm guessing maybe somehow I have a conflict with a built in Android attr. I've also verified that all of my style attributes below point to actual styles and not attr. Any help appreciated.</p> <p>Here's my full layout code:</p> <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@drawable/bkg_light" android:padding="@dimen/padding_med" &gt; &lt;RelativeLayout android:id="@+id/relativeLayout_activity" android:layout_width="fill_parent" android:layout_height="@dimen/button_height" android:background="@drawable/xml_button" android:padding="@dimen/padding_med" &gt; &lt;TextView style="@style/text_large_bold_white" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_centerVertical="true" android:text="@string/activity" /&gt; &lt;TextView android:id="@+id/textView_activity" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerVertical="true" android:layout_marginRight="@dimen/margin_med" android:layout_toLeftOf="@+id/textView_arrow_right_start_date" android:text="@string/none_selected"/&gt; &lt;TextView android:id="@+id/textView_arrow_right_start_date" style="@style/arrow_right" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" android:layout_centerVertical="true" /&gt; &lt;/RelativeLayout&gt; &lt;!-- kv Duration --&gt; &lt;RelativeLayout android:id="@+id/relativeLayout_duration" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_below="@+id/relativeLayout_activity" android:layout_marginTop="@dimen/margin_large" android:background="@drawable/xml_button"&gt; &lt;TextView android:id="@+id/textView_duration" style="@style/text_large_bold_white" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_centerVertical="true" android:text="@string/duration_lc" android:paddingLeft="@dimen/padding_med"/&gt; &lt;Spinner android:id="@+id/spinner_duration" android:layout_width="wrap_content" android:layout_height="@dimen/button_height" android:layout_alignParentRight="true" android:entries="@array/array_durations" android:prompt="@string/duration_lc" android:spinnerMode="dropdown" android:clickable="false"/&gt; &lt;/RelativeLayout&gt; &lt;/RelativeLayout&gt; </code></pre> <p>And here's my styles.xml:</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;resources&gt; &lt;style name="arrow_right"&gt; &lt;item name="android:textStyle"&gt;bold&lt;/item&gt; &lt;item name="android:textSize"&gt;@dimen/text_xxlarge&lt;/item&gt; &lt;item name="android:text"&gt;@string/arrow_right&lt;/item&gt; &lt;/style&gt; &lt;style name="button_blue"&gt; &lt;item name="android:textStyle"&gt;bold&lt;/item&gt; &lt;item name="android:textColor"&gt;@color/white&lt;/item&gt; &lt;item name="android:background"&gt;@drawable/selector_button_blue&lt;/item&gt; &lt;item name="android:padding"&gt;@dimen/padding_med&lt;/item&gt; &lt;/style&gt; &lt;style name="button_blue_small"&gt; &lt;item name="android:textStyle"&gt;bold&lt;/item&gt; &lt;item name="android:textColor"&gt;@color/white&lt;/item&gt; &lt;item name="android:background"&gt;@drawable/selector_button_blue_small&lt;/item&gt; &lt;item name="android:padding"&gt;@dimen/padding_med&lt;/item&gt; &lt;/style&gt; &lt;style name="button_dark"&gt; &lt;item name="android:textStyle"&gt;bold&lt;/item&gt; &lt;item name="android:textColor"&gt;@color/white&lt;/item&gt; &lt;item name="android:background"&gt;@drawable/selector_button_dark&lt;/item&gt; &lt;item name="android:padding"&gt;@dimen/padding_med&lt;/item&gt; &lt;/style&gt; &lt;style name="button_light"&gt; &lt;item name="android:textStyle"&gt;bold&lt;/item&gt; &lt;item name="android:textColor"&gt;@color/black&lt;/item&gt; &lt;item name="android:background"&gt;@drawable/selector_button_light&lt;/item&gt; &lt;item name="android:padding"&gt;@dimen/padding_med&lt;/item&gt; &lt;/style&gt; &lt;style name="button_light_small"&gt; &lt;item name="android:textStyle"&gt;bold&lt;/item&gt; &lt;item name="android:textColor"&gt;@color/black&lt;/item&gt; &lt;item name="android:textSize"&gt;@dimen/text_small&lt;/item&gt; &lt;item name="android:background"&gt;@drawable/selector_button_light&lt;/item&gt; &lt;item name="android:padding"&gt;@dimen/padding_small&lt;/item&gt; &lt;/style&gt; &lt;style name="text_small_gray_light"&gt; &lt;item name="android:textSize"&gt;@dimen/text_small&lt;/item&gt; &lt;item name="android:textColor"&gt;@color/gray_light&lt;/item&gt; &lt;/style&gt; &lt;style name="text_med_bold_gray_light"&gt; &lt;item name="android:textStyle"&gt;bold&lt;/item&gt; &lt;item name="android:textSize"&gt;@dimen/text_med&lt;/item&gt; &lt;item name="android:textColor"&gt;@color/gray_light&lt;/item&gt; &lt;/style&gt; &lt;style name="text_large_bold_white"&gt; &lt;item name="android:textStyle"&gt;bold&lt;/item&gt; &lt;item name="android:textSize"&gt;@dimen/text_large&lt;/item&gt; &lt;/style&gt; &lt;style name="text_large_bold_black"&gt; &lt;item name="android:textStyle"&gt;bold&lt;/item&gt; &lt;item name="android:textSize"&gt;@dimen/text_large&lt;/item&gt; &lt;item name="android:textColor"&gt;@color/black&lt;/item&gt; &lt;/style&gt; &lt;style name="text_large_bold_gray_dark"&gt; &lt;item name="android:textStyle"&gt;bold&lt;/item&gt; &lt;item name="android:textSize"&gt;@dimen/text_large&lt;/item&gt; &lt;item name="android:textColor"&gt;@color/gray_dark&lt;/item&gt; &lt;/style&gt; &lt;style name="text_large_bold_gray_light"&gt; &lt;item name="android:textStyle"&gt;bold&lt;/item&gt; &lt;item name="android:textSize"&gt;@dimen/text_large&lt;/item&gt; &lt;item name="android:textColor"&gt;@color/gray_light&lt;/item&gt; &lt;/style&gt; &lt;style name="text_large_bold_white"&gt; &lt;item name="android:textStyle"&gt;bold&lt;/item&gt; &lt;item name="android:textSize"&gt;@dimen/text_large&lt;/item&gt; &lt;item name="android:textColor"&gt;@color/white&lt;/item&gt; &lt;/style&gt; &lt;style name="text_large_white"&gt; &lt;item name="android:textSize"&gt;@dimen/text_large&lt;/item&gt; &lt;item name="android:textColor"&gt;@color/white&lt;/item&gt; &lt;/style&gt; &lt;/resources&gt; </code></pre> <p>And here's my custom theme.xml:</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;resources xmlns:android="http://schemas.android.com/apk/res/android"&gt; &lt;style name="Theme.P90X" parent="@style/Theme.Sherlock"&gt; &lt;item name="android:textColor"&gt;#ffffffff&lt;/item&gt; &lt;/style&gt; &lt;/resources&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload