摇篮错误"属性" XXX"已定义"在机器人工作室
问题描述:
我创建了Android的Studio中的一个项目,并使用Maven中央增加了一些相关性,当我尝试编译,我碰到这种类型的错误:
I created a project in Android Studio and added a few dependencies using Maven Central and when I try to compile, I run into this type of errors:
Error:Gradle: Attribute "titleTextStyle" has already been defined
Error:Gradle: Attribute "subtitleTextStyle" has already been defined
[...]
等等...这是我的build.gradle文件:
And so on... Here is my build.gradle file:
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.5.+'
}
}
apply plugin: 'android'
repositories {
mavenCentral()
}
android {
compileSdkVersion 18
buildToolsVersion "17.0.0"
defaultConfig {
minSdkVersion 8
targetSdkVersion 18
}
}
dependencies {
// Support Libraries
compile 'com.android.support:support-v4:18.0.0'
compile 'com.android.support:appcompat-v7:18.0.0'
compile 'com.android.support:support-v13:18.0.0'
// Third-Party Librairies
compile 'com.actionbarsherlock:actionbarsherlock:4.4.0@aar'
compile 'ch.acra:acra:4.5.0'
}
可悲的是使控制台不说话尽可能Eclipse的控制台,所以我不知道这个问题的起源。 有没有人有什么原因导致这些编译错误的想法?
Sadly the Make Console doesn't speak as much as Eclipse's Console, so I have no idea of the problem's origin. Does anyone have an idea of what causes these compile errors?
答
您应该删除你的依赖这一行:
You should remove this line in your dependencies :
compile 'com.android.support:appcompat-v7:18.0.0'