0

I am getting this error also with message:

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

This is my dependencies block of gradle. Please help. I also have my multidexenabled true

compile 'com.android.volley:volley:1.0.0'
compile project(':BaseGameUtils')
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.android.support:appcompat-v7:25.3.1'
testCompile 'junit:junit:4.12'
compile 'com.google.firebase:firebase-appindexing:11.0.2'
compile 'com.google.android.gms:play-services-ads:11.0.2'

compile 'com.android.support:recyclerview-v7:25.3.1'
compile 'com.android.support:design:25.3.1'

compile "com.squareup.picasso:picasso:2.4.0"
compile 'com.github.bumptech.glide:glide:3.5.2'
compile 'de.hdodenhof:circleimageview:1.3.0'
compile 'com.android.support:cardview-v7:25.3.1'
compile 'com.android.support:multidex:1.0.1'
Upendra Shah
  • 2,218
  • 17
  • 27

2 Answers2

0

What we have to do is to delete the extra package.

According to your question,we must know that which package the com/google/android/gms/internal/zznn.class is in.

Then,we will find the package and delete it.

KeLiuyue
  • 8,149
  • 4
  • 25
  • 42
  • Please can you specify which package should be removed? – Abhinav Masters Jul 20 '17 at 07:32
  • @AbhinavMasters Add `{ exclude group: 'com.google.android.gms' }` after `compile 'com.google.android.gms:play-services-ads:11.0.2'` – KeLiuyue Jul 20 '17 at 07:43
  • @AbhinavMasters another way to solve it ,you can look at this [https://stackoverflow.com/questions/33209631/errorexecution-failed-for-task-apptransformclasseswithjarmergingfordebug](https://stackoverflow.com/questions/33209631/errorexecution-failed-for-task-apptransformclasseswithjarmergingfordebug) – KeLiuyue Jul 20 '17 at 07:45
0

According to your log

com/google/android/gms/internal/zznn.class

duplicated so for that solution you have to remove that class file or exclude that library like

compile 'com.google.android.gms:play-services-ads:11.0.2'{exclude module: "moduleToRemove"}

Upendra Shah
  • 2,218
  • 17
  • 27