Android Builds are failing

Android builds are failing in both 2021.3652 on my PC and 2021.3654 on my mac with an older build that used to build just fine

Execution failed for task ':App:mergeReleaseJavaResource'.
11:21:08.556  > A failure occurred while executing com.android.build.gradle.internal.tasks.MergeJavaResWorkAction
11:21:08.556     > 2 files found with path 'META-INF/DEPENDENCIES' from inputs:
11:21:08.556        - C:\Users\Ernests\.gradle\caches\transforms-3\6c542f889f7a592e530a137580e9af98\transformed\jetified-httpclient-4.5.5.jar
11:21:08.556        - C:\Users\Ernests\.gradle\caches\transforms-3\ea28261c3d2255dabdd322836ab302c0\transformed\jetified-httpcore-4.4.9.jar
11:21:08.556       Adding a packagingOptions block may help, please refer to
11:21:08.556       https://google.github.io/android-gradle-dsl/current/com.android.build.gradle.internal.dsl.PackagingOptions.html
11:21:08.556       for more information

Not sure how to proceed, but this looks like it’s a server side thing on Solar2D’s end

Are you using any plugins?

Yes, and I just tried to isolate the plugin that is responsible for this problem and it is Google Play Games Services ‚Äúplugin.gpgs.v2‚ÄĚ

I also use ‚Äúplugin.google.iap.billing‚ÄĚ , ‚Äúshared.android.support.v4‚ÄĚ , ‚Äúplugin.unityads‚ÄĚ ‚Äúplugin.openssl‚ÄĚ, ‚ÄúCoronaProvider.native.popup.social‚ÄĚ, ‚ÄúCoronaProvider.analytics.flurry‚ÄĚ.

Commenting them all out (except gpgs.v2) did not fix the problem. I was building successfully all day yesterday till I noticed the error started happening, I tried deleting, reinstalling Solar2d and clear the .gradle cache to no avail.

Made an update last night and thought it was working well will clean out caches and double check

2 Likes

I have the same issue when I’m trying to create an Android build. By commenting all my plugins one by one I’ve discovered that the error is caused both by plugin.gpgs.v2 and plugin.admob. I can build a build only if plugin.gpgs.v2 and plugin.admob are commented out from build.settings.

@rebelbinary I just updated the plugin this issue went away in my testing

1 Like

I have not updated the Admob plugin and but will double check to make sure there is not conflict

1 Like

As I can see: plugin.gpgs.v2 does not cause any problems (thank you very much for the fix!), but plugin.admob still triggers the error message 'Execution failed for task ‚Äė:app:checkReleaseDuplicateClasses‚Äô

Can you post the plugin list?

Sure. I‚Äôve isolated the problem ones: [‚Äúplugin.admob‚ÄĚ], [‚Äúplugin.gpgs.v2‚ÄĚ],[‚Äúplugin.reviewPopUp‚ÄĚ]. The issues started on Monday. As I can see the main conflicted pair is [‚Äúplugin.admob‚ÄĚ] and [‚Äúplugin.gpgs.v2‚ÄĚ]. I can‚Äôt build a build when both of them are included in my build.settings file. But all work fine once one of them is commented out. Also there is a conflict between [‚Äúplugin.admob‚ÄĚ] and [‚Äúplugin.reviewPopUp‚ÄĚ]. I can build a build with ‚Äúplugin.admob‚ÄĚ included only if ‚Äúplugin.reviewPopUp‚ÄĚ and ‚Äúplugin.gpgs.v2‚ÄĚ are commented out. At the same time combination: ‚Äúplugin.reviewPopUp‚ÄĚ and ‚Äúplugin.gpgs.v2‚ÄĚ are included, but ‚Äúplugin.admob‚ÄĚ is commented out works fine.

Here is a table of the plugins combinations:

‚Äúplugin.admob‚ÄĚ (ON),‚Äúplugin.gpgs.v2‚ÄĚ (ON), ‚Äúplugin.reviewPopUp‚ÄĚ (ON) = Error
‚Äúplugin.admob‚ÄĚ (ON),‚Äúplugin.gpgs.v2‚ÄĚ (ON), ‚Äúplugin.reviewPopUp‚ÄĚ (OFF) = Error
‚Äúplugin.admob‚ÄĚ (ON),‚Äúplugin.gpgs.v2‚ÄĚ (OFF), ‚Äúplugin.reviewPopUp‚ÄĚ (ON) = Error

‚Äúplugin.admob‚ÄĚ (OFF),‚Äúplugin.gpgs.v2‚ÄĚ (ON), ‚Äúplugin.reviewPopUp‚ÄĚ (ON) = Success
‚Äúplugin.admob‚ÄĚ (ON),‚Äúplugin.gpgs.v2‚ÄĚ (OFF), ‚Äúplugin.reviewPopUp‚ÄĚ (OFF) = Success

It seems that plugin.admob can’t work neither with gpgs.v2 nor with reviewPopUp. But gpgs.v2 can be used with reviewPopUp without any issue. So the only way for me to create a build with plugin.admob is to turn off both gpgs.v2 and reviewPopUp

Thanks, will take a look at this today. Most likely with just need tweak/update admob to a slightly newer version

1 Like

Thank you!

I have this problem, as well. Commenting out the gpgs.v2 helped.

1 Like

I just pushed out an update to fix the conflict on the three plugins listed

1 Like

Thank you very much! There is no conflict between ‚Äúplugin.admob‚ÄĚ and ‚Äúplugin.gpgs.v2‚ÄĚ anymore. It is possible to build a build with two of them listed.

But it looks like ‚Äúplugin.reviewPopUp‚ÄĚ and ‚Äúplugin.admob‚ÄĚ still in conflict. It is not possible to create a build with two of them included.

‚Äúplugin.admob‚ÄĚ+‚Äúplugin.gpgs.v2‚ÄĚ = Success
‚Äúplugin.admob‚ÄĚ+‚Äúplugin.reviewPopUp‚ÄĚ = Error

I am also having a similar problem.
my error:

FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':App:checkReleaseDuplicateClasses'.
> A failure occurred while executing 
com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable
> Duplicate class com.google.common.util.concurrent.ListenableFuture found in 
modules jetified-guava-20.0 (com.google.guava:guava:20.0) and jetified- 
listenablefuture-1.0 (com.google.guava:listenablefuture:1.0)

If I turn off the two lines below, the build succeeds.

['plugin.appodeal.GoogleAdMob'] = { publisherId = 'com.coronalabs' },
['plugin.appodeal.A4G'] = { publisherId = 'com.coronalabs' },

Otherwise use the above two lines and disable the [‚Äúplugin.gpgs.v2‚ÄĚ] plugin. This method also builds successfully.

Any ideas to solve this problem?

Tested with build 3653 and 3649.

All plugins I’m using:

["CoronaProvider.native.popup.social"]
["CoronaProvider.native.popup.activity"]
["plugin.gpgs.v2"]
["CoronaProvider.gameNetwork.apple"]
["plugin.google.iap.billing"]
["plugin.iCloud"]
['plugin.vibrator'] = spiralcodestudio_plugin('vibrator'),
['plugin.appodeal.base']
['plugin.appodeal.Bidmachine']
['plugin.appodeal.GoogleAdMob']
['plugin.appodeal.A4G']
['plugin.appodeal.Unity']
['plugin.appodeal.Yandex']
['plugin.appodeal.AmazonAds']
['plugin.appodeal.AdColony']
['plugin.appodeal.IronSource']
['plugin.appodeal.Ogury']
['plugin.appodeal.Vungle']

I just found a solution through Googling in my case.
build just succeeded. But I don’t know this is the right way.
added this to the corona.gradle file.

dependencies {
implementation platform('com.google.guava:listenablefuture:9999.0-empty-to- avoid-conflict-with-guava')
}

yeah I added this to Admob already and just added to GPG Sv2 a couple minutes ago

1 Like

Scott thank you very much for your hard work! But the conflict between plugin.admob and plugin.reviewPopUp still persists. All other conflicts have gone (your fixes are working perfectly), but these two plugins can’t work together. The error is the same: DuplicateClasses.

I was still running into a similar build issue when I included the GPGSv2 plugin - updating to the latest version of Solar2D (3653) seems to have fixed that though. Just thought I’d mention it in case anyone else has the same problem.