java.util.zip.ZipException: duplicate entry during packageAllDebugClassesForMultiDex

后端 未结 21 1303
孤街浪徒
孤街浪徒 2020-11-22 07:37

I am not sure what this error means.

Execution failed for task \':excelSior:packageAllDebugClassesForMultiDex\'.
> java.util.zip.ZipException: duplicate          


        
21条回答
  •  醉话见心
    2020-11-22 08:29

    In my case exact error was below

    ':android:transformClassesWithJarMergingForDebug'.

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

    I was using another version of google apis i.e. in one modules gradle file

    if (!project.hasProperty('gms_library_version')) {
            ext.gms_library_version = '8.6.0'
       }
    

    however in other modules version 11.6.0 as below

       compile "com.google.android.gms:play-services-ads:11.6.0"
        compile "com.google.android.gms:play-services-games:11.6.0"
        compile "com.google.android.gms:play-services-auth:11.6.0"
    

    However to find this i did a ctrl + n in android studio and entered class name zzqx.class and then it displayed 2 jar files being pulled for this class and then i understood that somewhere i am using version 8.6.0 . On changing 8.6.0 to 11.6.0 and rebuilding the project the issue was fixed .

    Hope this helps .

    More on this here https://www.versionpb.com/tutorials/step-step-tutorials-libgdx-basic-setup-libgdx/implementing-google-play-services-leaderboards-in-libgdx/

提交回复
热议问题