java.util.zip.ZipException: duplicate entry:com/google/android/gms/auth/UserRecoverableAuthException.class

半城伤御伤魂 提交于 2019-12-11 12:15:02

问题


I'm getting this issue after building app,

Execution failed for task ':appname:transformClassesWithJarMergingForDebug. com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/google/android/gms/auth/UserRecoverableAuthException.class

My dependencies in build.gradle is

dependencies {
    compile fileTree(include: '*.jar', dir: 'libs')
    compile project(':_library')
    compile project(':android-support-v7-appcompat')
    compile project(':library_pull')
    compile project(':Drag_library')
    compile 'com.google.android.gms:play-services-appindexing:8.1.0'
    compile files('libs/org.apache.http.legacy.jar')
}

回答1:


Add this to the bottom of your app's build.gradle file:

configurations.all { exclude module: 'play-services-auth' }



来源:https://stackoverflow.com/questions/37874487/java-util-zip-zipexception-duplicate-entrycom-google-android-gms-auth-userreco

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!