0
\$\begingroup\$

I'm here struggling for hours to build my game (android) and 'Execution failed for task : checkReleaseDuplicateClasses'

Duplicate class androidx.annotation.AnimatorRes found in modules androidx.annotation.annotation-1.0.0.jar (androidx.annotation.annotation-1.0.0.jar) and androidx.annotation.annotation-1.1.0.jar (androidx.annotation.annotation-1.1.0.jar)
Duplicate class com.google.android.gms.auth.api.signin.zaa found in modules classes.jar (:com.google.android.gms.play-services-base-17.0.0:) and classes.jar (:com.google.android.gms.play-services-base-17.1.0:)

... are just two examples of the 486 warnings I'm getting. Can anyone help a noob out? Thanks so much for your time!

\$\endgroup\$
  • \$\begingroup\$ Worked when I deleted 2 files from Plugins/Android folder. \$\endgroup\$ – Psycarlo Nov 2 '19 at 23:59
  • \$\begingroup\$ If you've solved your problem, please post your solution as an Answer that can help others. Please be sure to include details of which files you had to delete, or the process that helped you identify that those files needed to be deleted. \$\endgroup\$ – DMGregory Nov 3 '19 at 0:33
  • 1
    \$\begingroup\$ "[...] and the process that helped [...]". Because deleting random files may cause more harm than anything else. \$\endgroup\$ – Vaillancourt Nov 3 '19 at 2:18
1
\$\begingroup\$

To solve this I deleted com.google.android.gms.play-services-base-17.0.0 and androidx.annotation.annotation-1.0.0 from Plugins/Android folder.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ Basically, you had two versions of the same jar, probably brought it by different packages. The error tells you which two jars have the same class and you just delete the older versioned jar. (I ran into this same problem and this answer helped me by example.) My case was weirder because google renamed the jar rather than versioning them, but a quick search shows the two jars were the same in spite of their rename. \$\endgroup\$ – DoomGoober Mar 10 at 5:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.