0

After a rebuild I get :

Error:Execution failed for task ':demo:transformDexArchiveWithExternalLibsDexMergerForMockDebug'.
> com.android.builder.dexing.DexArchiveMergerException: com.android.tools.r8.errors.CompilationError: Program type already present: com.google.android.gms.common.internal.zzag

What does that error message mean? What is wrong?

Ralf Wickum
  • 2,850
  • 9
  • 55
  • 103

3 Answers3

1

when I replaces gradle implementation instruction by (the older) compile , it works.

Ralf Wickum
  • 2,850
  • 9
  • 55
  • 103
0

The suggested workaround for this error is to delete the ./gradle folder inside your project or delete all the build folders and the gradle cache.

Additional references:

  1. Delete the .gradle directory.

  2. Run your app again.

Notes

  • The .gradle directory is in your project's root folder. (You may have to show hidden files first.)
  • I have to do this every time I update a dependency module using Android 3.0.

Hope this helps!

abielita
  • 13,147
  • 2
  • 17
  • 59
0

This error (and any other Program type already present: com.google.android.gms.common.internal.xxxxxx error) can be caused by different Play Services and Firebase versions. Make sure all implementation 'com.google.android.gms:xxxx:12.0.0 and all implementation 'com.google.firebase:xxxxxx:12.0.0' have the same version (12.0.0) in this example.

crysxd
  • 3,177
  • 20
  • 32