Code now gives error wth new ADT
<p>I've been using the following code in an XML layout file:</p>

<pre><code>&lt;!-- Copyright (C) 2008 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
--&gt;

&lt;!-- OK confirm and cancel buttons.  --&gt;
&lt;LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        android:divider="?android:attr/dividerHorizontal"
        android:showDividers="beginning"
        android:paddingTop="16dip"&gt;

    &lt;LinearLayout
            style="?android:attr/buttonBarStyle"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal"
            android:measureWithLargestChild="true"&gt;

        &lt;LinearLayout android:id="@+id/leftSpacer"
                android:layout_weight="0.25"
                android:layout_width="0dip"
                android:layout_height="wrap_content"
                android:orientation="horizontal"
                android:visibility="gone" /&gt;

        &lt;Button android:id="@+id/cancel_button"
                android:layout_width="0dip"
                android:layout_height="wrap_content"
                android:layout_gravity="left"
                android:layout_weight="1"
                android:text="@string/cancel"
                android:maxLines="2"
                style="?android:attr/buttonBarButtonStyle" /&gt;

        &lt;Button android:id="@+id/ok_button"
                android:layout_width="0dip"
                android:layout_height="wrap_content"
                android:layout_gravity="right"
                android:layout_weight="1"
                android:text="@string/install"
                android:maxLines="2"
                android:filterTouchesWhenObscured="true"
                style="?android:attr/buttonBarButtonStyle" /&gt;

        &lt;LinearLayout android:id="@+id/rightSpacer"
                android:layout_width="0dip"
                android:layout_weight="0.25"
                android:layout_height="wrap_content"
                android:orientation="horizontal"
                android:visibility="gone" /&gt;

    &lt;/LinearLayout&gt;
&lt;/LinearLayout&gt;
</code></pre>

<p>This created borderless buttons separated by a faint line as seen when installing an app in ICS or above or in the phone app. It used to even run fine in Froyo and Gingerbread however since updating to the latest version of ADT this XML layout file is giving compile error saying that button bar style and can only be used for API Level 11 and above.</p>

<p>As said before it used to compile fine, is there anything I can do to fix it. One hack is whenever I get the compile error is to increase the API level in the manifest, save it and then lower it again. Now ADT will not complain until I open the XML file again.</p>
