gpt4 book ai didi

android - Gradle:错误:多个库的包名称为 'com.google.android.gms'

转载 作者:IT老高 更新时间:2023-10-28 21:43:14 29 4
gpt4 key购买 nike

这个错误信息是什么意思?我的项目中没有重复的包

Error:Execution failed for task ':SimpleReader:processDebugResources'.
Error: more than one library with package name 'com.google.android.gms'
You can temporarily disable this error with android.enforceUniquePackageName=false However, this is temporary and will be enforced in 1.0

我的 build.gradle 看起来像这样:

buildscript {

repositories {
maven { url 'http://repo1.maven.org/maven2' }
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.9.1'
}
}
apply plugin: 'android'
android {
buildToolsVersion '19.0.3'
defaultConfig {
minSdkVersion 14
targetSdkVersion 17

}
compileSdkVersion 17
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
}
buildTypes {
}
}
dependencies {
compile 'com.android.support:support-v4:19.0.1'
compile 'com.google.android.gms:play-services:4.2.42'
compile files('libs/gson-2.2.4.jar')
compile files('libs/httpmime-4.1.jar')
compile files('libs/httpclient-4.1.1.jar')
compile files('libs/jsoup-1.7.3.jar')
compile project(':libraries:actionbarsherlock')
compile project(':libraries:sherlocknavigationdrawer')
compile project(':libraries:googleplayservices')
compile project(':libraries:androidslidinguppanel')
compile files('libs/protocol-1.0.4.jar')
compile files('libs/sentry-0.1.4.jar')
compile files('libs/commons-lang-2.3.jar')
}

最佳答案

就我而言,问题是因为我包括:

compile 'com.google.android.gms:play-services-wearable:+'
compile 'com.google.android.gms:play-services:4.4.52'

可穿戴游戏服务和常规服务。我注释掉了可穿戴部分,它可以工作。
不确定我是否需要它,但项目向导默认包含它

关于android - Gradle:错误:多个库的包名称为 'com.google.android.gms',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23494872/

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