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.