重复的条目:gms/auth/api/signin/internal/zzf.class [英] Duplicate entry: gms/auth/api/signin/internal/zzf.class

查看:87
本文介绍了重复的条目:gms/auth/api/signin/internal/zzf.class的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在问我要寻找答案的问题之前

Before asking the question I searched for answer

这是我的gradle文件

apply plugin: 'com.android.application'

    android {
        compileSdkVersion 24
        buildToolsVersion "24.0.2"


        defaultConfig {
            applicationId "a.thenotebook"
            minSdkVersion 16
            targetSdkVersion 24
            versionCode 1
            versionName "1.0"
            multiDexEnabled true
        }
        buildTypes {
            debug {
                debuggable true
            }
            release {
                minifyEnabled false
                proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            }
        }


        dependencies {
            compile fileTree(dir: 'libs', include: ['*.jar'])
            androidTestCompile 'junit:junit:4.12'
            compile 'com.android.support:appcompat-v7:25.1.0'
            compile 'com.android.support:design:25.1.0'
            compile 'com.google.firebase:firebase-auth:10.0.1'
            compile 'com.google.firebase:firebase-database:10.0.1'
            compile 'com.android.support:cardview-v7:25.1.0'
            compile 'com.android.support:recyclerview-v7:25.1.0'
            compile 'com.firebaseui:firebase-ui:1.0.0'
            compile 'com.google.firebase:firebase-appindexing:10.0.1'
            testCompile 'org.testng:testng:6.9.6'
            compile 'com.android.support:support-v4:25.1.0'
        }

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

错误:任务执行失败 ':app:transformClassesWithJarMergingForDebug'.

Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'.

com.android.build.api.transform.TransformException:java.util.zip.ZipException:重复项: com/google/android/gms/auth/api/signin/internal/zzf.class

com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/google/android/gms/auth/api/signin/internal/zzf.class

推荐答案

将此添加到您的build.gradle

task findJarsContaining {
    doLast {
        def jarTree = configurations.runtime.asFileTree.matching {
            include '*.jar'
        }
        jarTree.files.each { jarFile ->
            def matches = zipTree(jarFile).matching {
                include 'com/google/android/gms/auth/api/signin/internal/zzf.class'
            }.files
            if (matches) {
                println "Found $matches.size() matches in $jarFile.name"
            }
        }
    }
}

然后运行

gradle findJarsContaining

这篇关于重复的条目:gms/auth/api/signin/internal/zzf.class的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆