重复条目:com / google / android / gms / auth / api / signin / internal / zzf.class [英] duplicate entry: com/google/android/gms/auth/api/signin/internal/zzf.class

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

问题描述

在更新了我的google play服务和google存储库之后,我还更新了我的firebase sdk,当我开始运行应用程序时出现此错误,但是当我对它进行gradle时没有编译错误。

After updated my google play services and google repository, I also updated my firebase sdk and I get this error when I start running the app but when I gradle it no errors was compile.

这是我得到的错误:

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

这是我的gradle应用程序:

This is my gradle app:

apply plugin: 'com.android.application'

android {
  compileSdkVersion 24
  buildToolsVersion "24.0.2"

defaultConfig {
    applicationId "com.myapp.maecea.ipon4"
    minSdkVersion 16
    targetSdkVersion 24
    versionCode 5
    versionName "5.0"
    multiDexEnabled true
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
   }
 }

dependencies {
  compile fileTree(include: ['*.jar'], dir: 'libs')
  testCompile 'junit:junit:4.12'
  compile 'com.android.support:appcompat-v7:24.2.0'
  compile 'com.android.support:recyclerview-v7:24.2.0'

  compile 'com.google.firebase:firebase-database:10.0.1'
  compile 'com.google.firebase:firebase-auth:10.0.1'
  compile 'com.firebase:firebase-client-android:2.3.1'
  compile 'com.firebaseui:firebase-ui-database:0.4.0'
  compile 'com.firebaseui:firebase-ui:0.4.0'

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

虽然这是我的gradle项目:

While this is my gradle project:

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

buildscript {
repositories {
    jcenter()
    }
dependencies {
    classpath 'com.android.tools.build:gradle:2.1.3'
    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()
    mavenLocal()

}
}

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

这是我更新的依赖项:

 apply plugin: 'com.android.application'

android {
compileSdkVersion 24
buildToolsVersion "24.0.2"

defaultConfig {
    applicationId "com.myapp.maecea.ipon4"
    minSdkVersion 16
    targetSdkVersion 24
    versionCode 5
    versionName "5.0"
    multiDexEnabled true
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
}

 dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:24.2.0'
compile 'com.android.support:recyclerview-v7:24.2.0'

compile 'com.google.firebase:firebase-database:10.0.1'
compile 'com.google.firebase:firebase-auth:10.0.1'
compile 'com.firebaseui:firebase-ui-database:0.4.0'
compile 'com.firebaseui:firebase-ui:0.4.0'

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


推荐答案

解决二级问题无法解决的问题:com.twitter.sdk.android:twitter:2.2.0 ,更新您的顶级(Project)build.gradle文件以包含这些存储库:

To resolve the secondary problem of Failed to resolve: com.twitter.sdk.android:twitter:2.2.0, update your top-level (Project) build.gradle file to include these repositories:

    repositories {
        jcenter()
        mavenLocal()
        mavenCentral()
        maven { url 'https://maven.fabric.io/public' }
    }
}

这取自项目构建文件

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

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