2016-08-19 179 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 studio中構建android項目時出現錯誤

<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

任何提示.. ??請 –

+0

你可以[編輯]你的問題,包括更多的文字。意見是爲了回覆其他人 –

+0

把你的代碼,你嘗試過呢。 – KrishnaJ

回答

1

您正在使用的已被廢棄,將導致建立一個與Android的最新構建工具和支持庫錯誤actionbarsherlock。

您必須從您的項目中刪除com.actionbarsherlock:actionbarsherlock,並改用com.android.support:appcompat。它可能需要一些重構,但將需要完成以支持Android 6(ActionbarSherlock導致構建錯誤和Android 6及更高版本的崩潰)

如果您不需要支持最新版本的Android,您可以總是降級你的構建工具和支持庫,但我不會推薦這個。

+0

衝突感謝..我應該嘗試這個 –

+0

我可以用在這個項目actionbarsherlock以及.. –

+0

你會沒有再使用它的優勢了。 AppCompat具有ActionbarSherlock所需的全部功能。 ActionbarSherlock將導致運行Android 6或更高版本的設備發生崩潰。 – MrJM

相關問題