2015-09-04 55 views
-2

我從ANT導入了一箇舊項目到Gradle。我包括所有庫和tride構建,但我有問題:使用gradle構建時已經定義錯誤

E:\gradle\DriverClient\app\build\intermediates\exploded-aar\com.google.android.gms\play-services-wallet\7.8.0\res\values\wallet_colors.xml 
    Error:(2) Attribute "titleTextStyle" has already been defined 
    Error:(2) Attribute "subtitleTextStyle" has already been defined 
    Error:(2) Attribute "divider" has already been defined 
    Error:(2) Attribute "background" has already been defined 
    Error:(2) Attribute "backgroundSplit" has already been defined 
    Error:(2) Attribute "navigationMode" has already been defined 
    Error:(2) Attribute "displayOptions" has already been defined 
    ............................. 

我不明白什麼是錯的。這裏是我的搖籃依賴關係 -

dependencies { 
    compile fileTree(dir: 'libs', include: ['*.jar']) 
    compile 'com.android.support:appcompat-v7:23.0.0' 
    compile 'com.actionbarsherlock:actionbarsherlock:[email protected]' 
    compile 'com.larswerkman:HoloColorPicker:1.5' 
    compile 'com.google.android.gms:play-services:7.8.0' 
    compile 'org.jsoup:jsoup:1.8.3' 
    compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.4' 
} 
+0

如果宥downwote回答參數請 – ip696

回答

3

不能使用程序兼容性庫和ActionBarSherlock在一起,因爲他們使用的是相同的attrs。

我建議你使用appcompat庫因爲大約兩年前abs was deprecated,沒有更新和mantenaince。

+0

我瞭解和認識。但我需要使用那個舊的。我仍然只是一個翻譯gradle的項目,我不能改變 – ip696

+0

@ ip696在任何情況下,這是原因,他們不能一起工作。 –

1

嘗試刪除

compile 'com.google.android.gms:play-services:7.8.0' 

希望它能幫助:)