2016-08-19 14 views
0
 
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 

たとえば、エラー:(237)属性 "displayOptions"が既に互換性のない形式で定義されています。 は、ラインに来ている:あなたは廃止され、最新のAndroidビルドツールとサポートライブラリでビルドエラーが発生しますactionbarsherlockを使用しているアンドロイドスタジオでアンドロイドプロジェクトをビルド中にエラーが発生しました

<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> 
+0

任意のヒント.. ?? please –

+0

あなたの質問を編集することができます。コメントは他の人に返信することを意味します。 –

+0

まだ試したコードを入れてください。 – KrishnaJ

答えて

1

com.actionbarsherlock:actionbarsherlockをプロジェクトから削除し、代わりにcom.android.support:appcompatを使用する必要があります。それはおそらくいくつかのリファクタリングを必要としますが、Android 6をサポートするために実行する必要があります(Android 6以降のActionbarSherlockはビルドエラーやクラッシュを引き起こします)

最新のAndroidバージョンをサポートする必要がない場合は、常にビルドツールをダウングレードしてlibをサポートしていますが、これはお勧めしません。

+0

ありがとう..私はこれを試してください。 –

+0

このプロジェクトのアクションバーチャルロックでも使用できます... –

+0

もはやそれを使用する利点がありません。 AppCompatは、あなたがActionbarSherlockから必要なすべての機能を備えています。 ActionbarSherlockは、Android 6以降を実行している端末でクラッシュを引き起こします。 – MrJM

関連する問題