我在 Android Studio 中创建了一个项目并使用 Maven Central 添加了一些依赖项,当我尝试编译时,我遇到了这种类型的错误:
Error:Gradle: Attribute "titleTextStyle" has already been defined
Error:Gradle: Attribute "subtitleTextStyle" has already been defined
[...]
等等......这是我的 build.gradle 文件:
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'
}
遗憾的是,Make Console 的功能不如 Eclipse 的控制台,所以我不知道问题的根源。有谁知道导致这些编译错误的原因?