0
Android Studio中程序兼容性衝突我嘗試導入Eclipse項目到Android工作室和得到這個錯誤與ActionBarSherlock
Error:(1) Attribute "titleTextStyle" has already been defined
Error:(1) Attribute "subtitleTextStyle" has already been defined
Error:(1) Attribute "divider" has already been defined
Error:(1) Attribute "background" has already been defined
Error:(1) Attribute "backgroundSplit" has already been defined
Error:(1) Attribute "navigationMode" has already been defined
Error:(1) Attribute "displayOptions" has already been defined
Error:(1) Attribute "title" has already been defined
Error:(1) Attribute "subtitle" has already been defined
Error:(1) Attribute "icon" has already been defined
和我弄明白appcombat是actionbarsherlock衝突。我嘗試從abs遷移到appcombat。似乎我得到的項目是用actionbarsherlock硬編碼的。所以它對我來說是不可能的。我決定排除這個appcombat,這樣actionbarsherlock就不會發生衝突。
這裏是我的gradle這個
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion "23.0.0"
defaultConfig {
applicationId "org.myapps.android"
minSdkVersion 9
targetSdkVersion 17
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_5
targetCompatibility JavaVersion.VERSION_1_5
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
compile project(':menudrawer')
compile project(':actionbarsherlock')
compile 'com.android.support:support-v4:21.0.3'
compile 'com.google.android.gms:play-services:+'
compile 'com.google.code.gson:gson:2.3.1'
compile 'com.android.support:support-v4:21.0.3'
compile files('libs/httpmime-4.1.2.jar')
compile files('libs/tagsoup-1.2.1.jar')
compile files('libs/volley.jar')
compile files('libs/wordpresscom-android-rest-v0.0.3.jar')
}
其位oldy項目,但它的一切我所需要的。在這些gradle中。我沒有看到appcombat的依賴。所以如何從android studio中排除appcombat?
你爲什麼要需要兩個? – Blackbelt
只是在你的依賴關係列表中,你不需要兩次'support-v4'依賴。 – anthonycr
我只是弄明白,appcombat在編譯'com.android.support:support-v4:21.0.3'裏面太大聲了。即時通訊全新的。我只是刪除「編譯」com.android.support:support-v4:21.0.3'「行,仍然有錯誤。我只是谷歌,並發現該appcombat也在「com.google.android.gms:play-services」中。所以如何從「com.google.android.gms:play-services」中排除appcombat? – jchristsake