gpt4 book ai didi

android - 错误重复条目 : com/google/android/gms/common/api/zze. 类

转载 作者:塔克拉玛干 更新时间:2023-11-03 00:45:10 26 4
gpt4 key购买 nike

我正在使用 Firebase 创建 Facebook 登录 系统。但是当我编译项目时,它给了我:

Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'. com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/google/android/gms/common/api/zze.class

build.gradle(项目):

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
repositories {
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.2'
classpath 'com.google.gms:google-services:3.0.0'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

allprojects {
repositories {
jcenter()
}
}

task clean(type: Delete) {
delete rootProject.buildDir
}

build.gradle(应用程序):

apply plugin: 'com.android.application'

android {
compileSdkVersion 25
buildToolsVersion "24.0.2"
defaultConfig {
applicationId "com.zihadrizkyef.belajar_facebooklogin"
minSdkVersion 19
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:multidex:1.0.1'
compile 'com.android.support:appcompat-v7:25.0.1'
compile 'com.google.firebase:firebase-core:10.0.0'
compile 'com.google.firebase:firebase-auth:9.8.0'
compile 'com.facebook.android:facebook-android-sdk:[4,5)'
testCompile 'junit:junit:4.12'
}

apply plugin: 'com.google.gms.google-services'

最佳答案

所有 Firebase 库的版本必须相同。使用版本 10.0.0 的 firebase-auth:

compile 'com.google.firebase:firebase-core:10.0.0'
compile 'com.google.firebase:firebase-auth:10.0.0'

关于android - 错误重复条目 : com/google/android/gms/common/api/zze. 类,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40754492/

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