Vishal Sharma
Vishal Sharma

Reputation: 31

getting error while build android project in android studio

Error:(210) Attribute "background" already defined with incompatible format.
Error:(64) Original attribute defined here.
Error:(237) Attribute "navigationMode" already defined with incompatible format.
Error:(210) Original attribute defined here.
Error:(210) Original attribute defined here.
Error:(237) Attribute "displayOptions" already defined with incompatible format.
Error:(246) Attribute "actionBarSize" already defined with incompatible format.
Error:(220) Original attribute defined here.
Error:(246) Attribute "windowMinWidthMajor" already defined with incompatible format.
Error:(220) Original attribute defined here.
Error:(246) Attribute "windowMinWidthMinor" already defined with incompatible format.
Error:(220) Original attribute defined here.
Error:Execution failed for task ':app:processDebugResources'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/home/gumbi/Android/Sdk/build-tools/24.0.0/aapt'' finished with non-zero exit value 1

for example Error:(237) Attribute "displayOptions" already defined with incompatible format. is coming in line :

   <declare-styleable name="SherlockActionBar">
    <attr name="navigationMode">
        <enum name="normal" value="0"/>
        <enum name="listMode" value="1"/>
        <enum name="tabMode" value="2"/>
    </attr>
    <attr name="displayOptions">
        <flag name="useLogo" value="0x1"/>
        <flag name="showHome" value="0x2"/>
        <flag name="homeAsUp" value="0x4"/>
        <flag name="showTitle" value="0x8"/>
        <flag name="showCustom" value="0x10"/>
        <flag name="disableHome" value="0x20"/>
    </attr>
    <attr name="title" format="string"/>
    <attr name="subtitle" format="string"/>
    <attr name="titleTextStyle"/>
    <attr name="subtitleTextStyle"/>
    <attr name="icon" format="reference"/>
    <attr name="logo" format="reference"/>
    <attr name="divider"/>
    <attr name="background"/>
    <attr name="backgroundStacked" format="reference|color"/>
    <attr name="backgroundSplit"/>
    <attr name="customNavigationLayout" format="reference"/>
    <attr name="height"/>
    <attr name="homeLayout" format="reference"/>
    <attr name="progressBarStyle" format="reference"/>
    <attr name="indeterminateProgressStyle" format="reference"/>
    <attr name="progressBarPadding" format="dimension"/>
    <attr name="itemPadding" format="dimension"/>
</declare-styleable>

Upvotes: 0

Views: 2350

Answers (1)

MrJM
MrJM

Reputation: 1214

You are using actionbarsherlock which is deprecated and will cause build errors with the newest android build tools and support libraries.

You will have to remove com.actionbarsherlock:actionbarsherlock from your project and use com.android.support:appcompat instead. It will possibly require some refactoring but will need to be done in order to support Android 6 (ActionbarSherlock causes build errors and crashes from Android 6 and higher)

If you don't need to support the newest versions of Android you can always downgrade your build tools and support lib for now but I wouldn't recommend this.

Upvotes: 1

Related Questions