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…

I also have this problem.
Is there a workaround now?

Execution failed for task ':App:checkReleaseDuplicateClasses'.
ERROR: Build Failed: Error code: 256

log.txt (47.9 KB)

I also still have this problem. Appodeal’s Admob SDK conflicts with some other plugin. Since the version 3606 I can not be able to build.

This error is exactly what it says. You have 2 plugins that are using the same library. I don’t have @bamazy logs but for you @SUPER_TOKI the issue is with facebook. I don’t know what plugin you are using but removing facebook should resolve the problem for now:

Duplicate class com.facebook.login.DefaultAudience found in modules jetified-facebook-core-7.1.0-runtime.jar (com.facebook.android:facebook-core:7.1.0) and jetified-plugins.jar (plugins.jar)

@agramonte Yes, the reason this problem appears is in the plugins.
In my case, I confirmed that it was facebookAnalytics, and I already informed Scott.

@agramonte, the reason in my case is also plugins. When I disable Appodeal Admob, everything works. Therefore, for now I’m using 3606 to be able to build with Admob.

This error occurred again.
There was a problem with the Android build.
(Android Build Error 256)
It seems to be a problem with plugin.reviewPopUp.

  • Corona Version 2021.3638
  • macOS Big Sur ver 11.2

plugins =
{

    ------------------------------------------------------------------
    -- plugins.solar2d.com
    ------------------------------------------------------------------
    ["plugin.notifications.v2"] = { publisherId = "com.coronalabs" },
    ["CoronaProvider.native.popup.social"] = { publisherId = "com.coronalabs" },
    ["CoronaProvider.native.popup.activity"] = { publisherId = "com.coronalabs" },
    ["plugin.utf8"] = { publisherId = "com.coronalabs" },
    ["plugin.facebook.v4a"] = { publisherId = "com.coronalabs" },
    ["plugin.unityads"] = { publisherId = "com.coronalabs" },
    
    
    ------------------------------------------------------------------
    -- solar2dmarketplace.com - scott
    ------------------------------------------------------------------
    ["plugin.reviewPopUp"] = { publisherId = "tech.scotth", marketplaceId = "my id" },
    ["plugin.gamecenter"] = { publisherId = "tech.scotth", marketplaceId = "my id" },
    ["plugin.facebookAnalytics"] =  { publisherId = "tech.scotth", marketplaceId = "my id" },


    ------------------------------------------------------------------
    -- solar2dplugins.com
    ------------------------------------------------------------------
    ["plugin.gameanalytics_v2"] =
    {
        publisherId = "com.gameanalytics",
        supportedPlatforms =
        {
            android = { url="https://www.solar2dplugins.com/download/gameanalytics/super_toki/114da0ef7092bbe4e34da95ca202f438a52c6e78-android.tar.gz" },

            iphone = { url="https://www.solar2dplugins.com/download/gameanalytics/super_toki/114da0ef7092bbe4e34da95ca202f438a52c6e78-iphone.tar.gz" },
            ["iphone-sim"] = { url="https://www.solar2dplugins.com/download/gameanalytics/super_toki/114da0ef7092bbe4e34da95ca202f438a52c6e78-iphone-sim.tar.gz" },

            macos = { url="https://www.solar2dplugins.com/download/gameanalytics/super_toki/114da0ef7092bbe4e34da95ca202f438a52c6e78-mac.tar.gz" },
            ["mac-sim"] = { url="https://www.solar2dplugins.com/download/gameanalytics/super_toki/114da0ef7092bbe4e34da95ca202f438a52c6e78-mac.tar.gz" },

            win32 = { url="https://www.solar2dplugins.com/download/gameanalytics/super_toki/114da0ef7092bbe4e34da95ca202f438a52c6e78-win.tar.gz" },
            ["win32-sim"] = { url="https://www.solar2dplugins.com/download/gameanalytics/super_toki/114da0ef7092bbe4e34da95ca202f438a52c6e78-win.tar.gz" },

            linux = { url="https://www.solar2dplugins.com/download/gameanalytics/super_toki/114da0ef7092bbe4e34da95ca202f438a52c6e78-linux.tar.gz" },
            ["linux-sim"] = { url="https://www.solar2dplugins.com/download/gameanalytics/super_toki/114da0ef7092bbe4e34da95ca202f438a52c6e78-linux.tar.gz" },
        },
    },
},
1 Like

Yes. I tested with your configuration and it looks like the revewpopup plugin is the one with the conflict.

@agramonte Thanks for testing.
@Scott_Harrison Please check this issue.

looking into this

@SUPER_TOKI @agramonte
This should be fixed now, just rebuild (close and reopen sim if still get error)