我的gradle scriptsi出了问题。 我得到了:
错误:任务':app:processDebugResources'执行失败。
错误:多个包含包名称的库' com.google.android.gms'
以下是我的评论:
Gradle(APP):
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
android {
compileSdkVersion 25
buildToolsVersion "25.0.0"
useLibrary 'org.apache.http.legacy'
lintOptions{
checkReleaseBuilds false
}
defaultConfig {
applicationId "com.dbrewardsnew"
minSdkVersion 15
vectorDrawables.useSupportLibrary = true
targetSdkVersion 25
multiDexEnabled true
}
aaptOptions {
additionalParameters "--no-version-vectors"
}
signingConfigs {
release {
storeFile file("kluczglowny.jks")
storePassword "asiunia"
keyAlias "android"
keyPassword "asiunia"
}
}
buildTypes {
release {
//minifyEnabled false
//proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
//signingConfig signingConfigs.release
//multiDexEnabled true
}
}
packagingOptions {
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE-FIREBASE.txt'
exclude 'META-INF/NOTICE'
}
}
repositories {
mavenCentral()
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
//compile 'com.google.android.gms:play-services:8.3.0'
compile('com.crashlytics.sdk.android:crashlytics:2.6.5@aar') {
transitive = true;
}
compile files('libs/NativeXMonetizationSDK_v5.4.12.jar')
compile files('libs/Parse-1.3.8.jar')
compile files('libs/SuperRewards-3.1b.jar')
compile files('libs/TrialpayAndroidSdk.jar')
compile files('libs/acra-4.5.0.jar')
compile files('libs/adcolony.jar')
compile 'pl.bclogic:pulsator4droid:1.0.3'
compile 'com.google.firebase:firebase-core:10.0.1'
compile 'com.google.firebase:firebase-messaging:10.0.1'
compile 'com.google.android.gms:play-services-auth:10.0.1'
compile 'com.mcxiaoke.volley:library:1.0.18'
compile 'uk.co.chrisjenx:calligraphy:2.2.0'
compile files('libs/adscendmedia1.0.1.jar')
compile files('libs/dagger-1.2.2.jar')
compile 'com.github.leonardoxh:custom-font:1.2'
compile 'com.github.leonardoxh:custom-font:1.2'
compile 'com.github.chrisbanes:PhotoView:1.2.6'
compile files('libs/javax.inject-1.jar')
compile files('libs/mediationsdk-6.2.2.jar')
compile files('libs/nineoldandroids-2.4.0.jar')
compile files('libs/personasdk1.1.jar')
compile files('libs/picasso-2.4.0.jar')
compile files('libs/tapjoyconnectlibrary.jar')
compile files('libs/vungle-publisher-adaptive-id-3.3.1.jar')
compile files('libs/chartboost.jar')
compile files('libs/applovin-sdk-6.1.5.jar')
compile files('libs/heyzap.jar')
compile files('libs/revmob.jar')
compile project(':appGradeLib')
//compile project(':sensiblefacebooksdk')
compile project(':googleplayserviceslib')
compile files('libs/AdxmiCustomizedSdk_v1.2.0_2015-11-13.jar')
compile files('libs/AdxmiSdk_v5.4.0_2015-11-12.jar')
compile project(':unity-ads')
compile files('libs/org.apache.http.legacy.jar')
compile 'com.facebook.android:facebook-android-sdk:4.+'
compile 'com.google.code.gson:gson:2.3.1'
compile 'com.android.support:multidex:1.0.1'
compile 'com.vstechlab.easyfonts:easyfonts:1.0.0'
compile 'com.febaisi:custom-textview:0.0.3'
compile 'com.scopely:fontain:1.0.0'
compile 'com.android.support:design:25.0.0'
compile 'com.android.support:support-v4:25.0.0'
compile 'com.android.support:appcompat-v7:25.0.0'
}
Project gradle:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
mavenCentral()
maven { url 'https://maven.fabric.io/public' }
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.2'
classpath 'io.fabric.tools:gradle:1.+'
classpath 'com.google.gms:google-services:3.0.0'
}
}
allprojects {
repositories {
jcenter()
maven { url "https://jitpack.io"}
}
}
我的设置是gradle:
include ':app', ':googleplayserviceslib', ':unity-ads', ':calligraphy-2.2.0', ':pugnotification-1.8.1'
include ':appGradeLib'
哪里有问题?我没有看到重复的gms。
答案 0 :(得分:0)
您的某个依赖项取决于旧版Google Play服务(" monolithic" one:googleplayserviceslib)。您无法将此版本与较新版本合并。要么只使用旧版本而不是较新的google-play-services-auth,要么删除/更新取决于旧版本的内容,以便与新版的google-play-services兼容。
删除一个或删除另一个之后发布您的构建错误以获得更多帮助。