Android - TransformException:java.util.zip.ZipException:重复条目:com / google / android / gms / internal / zzblr.class

时间:2017-05-03 13:41:51

标签: android firebase firebase-realtime-database google-play-services firebase-authentication

我正在尝试执行基于firebase的应用程序,它会给我以下错误 更新1-我更新multiDexEnabledtrue也包含packagingOptions,但收到此错误:

错误日志 - Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'. -> com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/google/android/gms/internal/zzblr.class

我的应用级build.gradle: -

apply plugin: 'com.android.application'

android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
    applicationId "com.multiplexerx.smartjournal"
    minSdkVersion 16
    targetSdkVersion 25
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    multiDexEnabled true
}
packagingOptions {
    exclude 'META-INF/DEPENDENCIES.txt'
    exclude 'META-INF/LICENSE.txt'
    exclude 'META-INF/NOTICE.txt'
    exclude 'META-INF/NOTICE'
    exclude 'META-INF/LICENSE'
    exclude 'META-INF/DEPENDENCIES'
    exclude 'META-INF/notice.txt'
    exclude 'META-INF/license.txt'
    exclude 'META-INF/dependencies.txt'
    exclude 'META-INF/LGPL2.1'
}
buildTypes {

    release {
        minifyEnabled  true
        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.github.chyrta:AndroidOnboarder:0.7'
compile 'com.google.firebase:firebase-auth:10.2.1'
compile 'com.google.android.gms:play-services-auth:10.2.1'
compile 'com.android.support:appcompat-v7:25.3.0'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.google.firebase:firebase-database:10.0.1'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'

1 个答案:

答案 0 :(得分:3)

确保您为所有Firebase(和播放服务)使用相同的库版本:

<tbody ng-repeat="emp in employees">