更新 SDK 工具和播放服务库后构建失败
Build failed after updating SDK tools and plays services libraries
您好,我目前已经更新了我的 SDK 工具以及我的 SDK 的其他组件,除了 M-preview 和我目前不会使用的示例文件。现在的问题是在更新库并同步 gradle 之后它给了我这个错误:
error: Attribute "track" has already been defined
error: Attribute "thumbTextPadding" has already been defined
error: Attribute "switchMinWidth" has already been defined
error: Attribute "switchPadding" has already been defined
现在我的应用无法构建或 运行 由于此值错误我不确定为什么会发生。这是我当前的 gradle 文件:
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
lintOptions{
checkReleaseBuilds false
abortOnError true
}
defaultConfig {
minSdkVersion 14
targetSdkVersion 22
versionCode 17
versionName "1.1.0"
}
buildTypes {
release {
runProguard true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES.txt'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/notice.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/dependencies.txt'
exclude 'META-INF/LGPL2.1'
}
}
dependencies {
compile 'com.android.support:design:22.2.0'
compile 'com.joooonho:selectableroundedimageview:1.0.1'
compile 'com.android.support:appcompat-v7:22.2.0'
compile 'com.google.android.gms:play-services:7.5.0'
compile 'in.srain.cube:grid-view-with-header-footer:1.0.9'
compile 'com.felipecsl.quickreturn:library:1.5.1'
compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.2'
compile 'it.sephiroth.android.library.imagezoom:imagezoom:+'
compile 'com.makeramen:roundedimageview:1.5.0'
compile fileTree(dir: 'libs', include: ['*.jar'])
compile project(':libraries:facebook')
}
有人能告诉我为什么会这样吗? TIA.
从它的外观来看,您正在使用的属性即
error: Attribute "track" has already been defined
error: Attribute "thumbTextPadding" has already been defined
error: Attribute "switchMinWidth" has already been defined
error: Attribute "switchPadding" has already been defined
M-Preview 可能正在使用 SDK.Just 更改您在 attrs.xml
文件中使用的 Switch 的属性,您就可以开始了!
您好,我目前已经更新了我的 SDK 工具以及我的 SDK 的其他组件,除了 M-preview 和我目前不会使用的示例文件。现在的问题是在更新库并同步 gradle 之后它给了我这个错误:
error: Attribute "track" has already been defined
error: Attribute "thumbTextPadding" has already been defined
error: Attribute "switchMinWidth" has already been defined
error: Attribute "switchPadding" has already been defined
现在我的应用无法构建或 运行 由于此值错误我不确定为什么会发生。这是我当前的 gradle 文件:
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
lintOptions{
checkReleaseBuilds false
abortOnError true
}
defaultConfig {
minSdkVersion 14
targetSdkVersion 22
versionCode 17
versionName "1.1.0"
}
buildTypes {
release {
runProguard true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES.txt'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/notice.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/dependencies.txt'
exclude 'META-INF/LGPL2.1'
}
}
dependencies {
compile 'com.android.support:design:22.2.0'
compile 'com.joooonho:selectableroundedimageview:1.0.1'
compile 'com.android.support:appcompat-v7:22.2.0'
compile 'com.google.android.gms:play-services:7.5.0'
compile 'in.srain.cube:grid-view-with-header-footer:1.0.9'
compile 'com.felipecsl.quickreturn:library:1.5.1'
compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.2'
compile 'it.sephiroth.android.library.imagezoom:imagezoom:+'
compile 'com.makeramen:roundedimageview:1.5.0'
compile fileTree(dir: 'libs', include: ['*.jar'])
compile project(':libraries:facebook')
}
有人能告诉我为什么会这样吗? TIA.
从它的外观来看,您正在使用的属性即
error: Attribute "track" has already been defined
error: Attribute "thumbTextPadding" has already been defined
error: Attribute "switchMinWidth" has already been defined
error: Attribute "switchPadding" has already been defined
M-Preview 可能正在使用 SDK.Just 更改您在 attrs.xml
文件中使用的 Switch 的属性,您就可以开始了!