While creating the apk I got the following error :
"Duplicate id @+id/image, already defined earlier in this layout .... abc_activity_chooser_view.xml:58 in layout (appcompat_v7)"
So I cleaned it, still the same. There is indeed duplicate id @+id/image in this file :
<?xml version="1.0" encoding="utf-8"?>
<view xmlns:android="http://schemas.android.com/apk/res/android"
class="android.support.v7.internal.widget.ActivityChooserView$InnerLayout"
android:id="@+id/activity_chooser_view_content"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="center"
style="?attr/activityChooserViewStyle">
<FrameLayout
android:id="@+id/expand_activities_button"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="center"
android:focusable="true"
android:addStatesFromChildren="true"
android:background="?attr/actionBarItemBackground">
<ImageView android:id="@+id/image"
android:layout_width="32dip"
android:layout_height="32dip"
android:layout_gravity="center"
android:layout_marginTop="2dip"
android:layout_marginBottom="2dip"
android:layout_marginLeft="12dip"
android:layout_marginRight="12dip"
android:scaleType="fitCenter"
android:adjustViewBounds="true" />
</FrameLayout>
<FrameLayout
android:id="@+id/default_activity_button"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="center"
android:focusable="true"
android:addStatesFromChildren="true"
android:background="?attr/actionBarItemBackground">
<ImageView android:id="@+id/image"
android:layout_width="32dip"
android:layout_height="32dip"
android:layout_gravity="center"
android:layout_marginTop="2dip"
android:layout_marginBottom="2dip"
android:layout_marginLeft="12dip"
android:layout_marginRight="12dip"
android:scaleType="fitCenter"
android:adjustViewBounds="true" />
</FrameLayout>
</view>
Any ideas of how to deal with this ? Obviously I can't just rename it. I can skip checking it in Lint, but the error still persists and I don't think this is the best solution. Any more reliable solutions ?