Build Error Execution failed for task ':App:checkReleaseDuplicateClasses'

Build Error - Execution failed for task ‘:App:checkReleaseDuplicateClasses’.

1 exception was raised by workers:
java.lang.RuntimeException: Duplicate class android.support.annotation.AnimRes found in modules plugins.jar (plugins.jar) and support-annotations-28.0.0.jar (com.android.support:support-annotations:28.0.0)

I understand that there is a duplicate that needs to be removed but what I don’t understand where the packaged are. Where can I find plugins.jar and support-28.0.0.jar?

What build version are you using? On Mac or Windows? For iOS or Android or both?

Version 3598. Tried on Mac and Windows with same error. Only tried build for Android.

Seeing the same thing in Android building, but for the UnityAd plugin… Will dig in.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':App:checkReleaseDuplicateClasses'.
> 1 exception was raised by workers:
  java.lang.RuntimeException: Duplicate class com.unity3d.ads.BuildConfig found in modules UnityAds-3.1.0-runtime.jar (UnityAds-3.1.0.aar) and unity-ads-3.4.2-runtime.jar (unity-ads-3.4.2.aar)
  Duplicate class com.unity3d.ads.IUnityAdsListener found in modules UnityAds-3.1.0-runtime.jar (UnityAds-3.1.0.aar) and unity-ads-3.4.2-runtime.jar (unity-ads-3.4.2.aar)
  Duplicate class com.unity3d.ads.UnityAds found in modules UnityAds-3.1.0-runtime.jar (UnityAds-3.1.0.aar) and unity-ads-3.4.2-runtime.jar (unity-ads-3.4.2.aar)

Hey guys, I think those are 2 separate errors, both related to plugins used.

First, about plugins.jar, it seems that some plugin has compiled in annotations, shared among all plugins.

Second, com.unity3d.ads.BuildConfig is duplicated. Seemingly UnityAds plugin is included twice, possibly in two separate plugins

Gotcha. I’m not using a bunch of plugins, so should be easy to track down. I’ll start another topic.

So, I pulled all the plugins out other than UnityAds and it still fails. Added an issue here…