gpt4 book ai didi

android - 更新 SDK 工具和播放服务库后构建失败

转载 作者:行者123 更新时间:2023-11-30 02:06:36 25 4
gpt4 key购买 nike

您好,我目前已经更新了我的 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 使用。只需在 attrs.xml 文件中更改您正在使用的 Switch 的属性即可!

关于android - 更新 SDK 工具和播放服务库后构建失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30590657/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com