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