My Unity game builds for Android fine with In App Purchasing 4.11.0 but Google is saying I have 56 days remaining to update to Google Play Billing Library 6.0.1 or later which means updating to 4.12.0. However when I do that, it says “Gradle build failed: See the Console for details.”
The first error is this:
I’m not sure where the build.gradle file is ? Next …
My initial reaction is WTF ?? Why does nothing ever work when I build for Android ??
First error - build.gradle, malformed.
Second error states: C:\Development\Unity 5\Yatzy\Library\Bee\Android\Prj\IL2CPP\Gradle\unityLibrary\build.gradle has dependency issue.
What Unity version are you using and could you attach build.gradle file from second error?
I have the same issue. Unity 2022.3.31, just upgrading the IAP purchase package to the latest breaks the build with this warning followed by a long and truncated exception and I don’t have a custom build.gradle file either.
Google Play is requiring the apps to use newer versions of IAP and will take down the apps if not updated by Aug 31. So if you are helping us, please do it a bit faster.
I have the very latest version of External Dependency Manager and Jetlifier is enabled.
The Exception
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
Note: Library\Bee\Android\Prj\IL2CPP\Gradle\unityLibrary\src\main\java\com\unity3d\player\UnityPlayerActivity.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':launcher:checkReleaseDuplicateClasses'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable
> Duplicate class a.a.a found in modules jetified-com.android.installreferrer.installreferrer-2.2-runtime (:com.android.installreferrer.installreferrer-2.2:) and jetified-installreferrer-2.2-runtime (com.android.installreferrer:installreferrer:2.2)
Duplicate class android.support.customtabs.ICustomTabsCallback found in modules browser-1.4.0-runtime (androidx.browser:browser:1.4.0) and jetified-androidx.browser.browser-1.4.0-runtime (:androidx.browser.browser-1.4.0:)
Duplicate class android.support.customtabs.ICustomTabsCallback$Default found in modules browser-1.4.0-runtime (androidx.browser:browser:1.4.0) and jetified-androidx.browser.browser-1.4.0-runtime (:androidx.browser.browser-1.4.0:)
Duplicate class android.support.customtabs.ICustomTabsCallback$Stub found in modules browser-1.4.0-runtime (androidx.browser:browser:1.4.0) and jetified-androidx.browser.browser-1.4.0-runtime (:androidx.browser.browser-1.4.0:)
Duplicate class android.support.customtabs.ICustomTabsCallback$Stub$Proxy found in modules browser-1.4.0-runtime (androidx.browser:browser:1.4.0) and jetified-androidx.browser.browser-1.4.0-runtime (:androidx.browser.browser-1.4.0:)
Duplicate class android.support.customtabs.ICustomTabsService found in modules browser-1.4.0-runtime (androidx.browser:browser:1.4.0) and jetified-androidx.browser.browser-1.4.0-runtime (:androidx.browser.browser-1.4.0:)
Duplicate class android.support.customtabs.ICustomTabsService$Default found in modules browser-1.4.0-runtime (androidx.browser:browser:1.4.0) and jetified-androidx.browser.browser-1.4.0-runtime (:androidx.browser.browser-1.4.0:)
Duplicate class android.support.customtabs.ICustomTabsService$Stub found in modules browser-1.4.0-runtime (androidx.browser:browser:1.4.0) and jetified-androidx.browser.browser-1.4.0-runtime (:androidx.browser.browser-1.4.0:)
Duplicate class android.support.customtabs.ICustomTabsService$Stub$Proxy found in modules browser-1.4.0-runtime (androidx.browser:browser:1.4.0) and jetified-androidx.browser.browser-1.4.0-runtime (:androidx.browser.browser-1.4.0:)
Duplicate class android.support.customtabs.IPostMessageService found in modules browser-1.4.0-runtime (androidx.browser:browser:1.4.0) and jetified-androidx.browser.browser-1.4.0-runtime (:androidx.browser.browser-1.4.0:)
Duplicate class android.support.customtabs.IPostMessageService$Default found in modules browser-1.4.0-runtime (androidx.browser:browser:1.4.0) and jetified-androidx.browser.browser-1.4.0-runtime (:androidx.browser.browser-1.4.0:)
Duplicate class android.support.customtabs.IPostMessageService$Stub found in modules browser-1.4.0-runtime (androidx.browser:browser:1.4.0) and jetified-androidx.browser.browser-1.4.0-runtime (:androidx.browser.browser-1.4.0:)
Duplicate class android.support.customtabs.IPostMessageService$Stub$Proxy found in modules browser-1.4.0-runtime (androidx.browser:browser:1.4.0) and jetified-androidx.browser.browser-1.4.0-runtime (:androidx.browser.browser-1.4.0:)
Duplicate class android.support.customtabs.trusted.ITrustedWebActivityCallback found in modules browser-1.4.0-runtime (androidx.browser:browser:1.4.0) and jetified-androidx.browser.browser-1.4.0-runtime (:androidx.browser.browser-1.4.0:)
Duplicate class android.support.customtabs.trusted.ITrustedWebActivityCallback$Default found in modules browser-1.4.0-runtime (androidx.browser:browser:1.4.0) and jetified-androidx.browser.browser-1.4.0-runtime (:androidx.browser.browser-1.4.0:)
Duplicate class android.support.customtabs.trusted.ITrustedWebActivityCallback$Stub found in modules browser-1.4.0-runtime (androidx.browser:browser:1.4.0) and jetified-androidx.browser.browser-1.4.0-runtime (:androidx.browser.browser-1.4.0:)
Duplicate class android.support.customtabs.trusted.ITrustedWebActivityCallback$Stub$Proxy found in modules browser-1.4.0-runtime (androidx.browser:browser:1.4.0) and jetified-androidx.browser.browser-1.4.0-runtime (:androidx.browser.browser-1.4.0:)
Duplicate class android.support.customtabs.trusted.ITrustedWebActivityService found in modules browser-1.4.0-runtime (androidx.browser:browser:1.4.0) and jetified-androidx.browser.browser-1.4.0-runtime (:androidx.browser.browser-1.4.0:)
Duplicate class android.support.customtabs.trusted.ITrustedWebActivityService$Default found in modules browser-1.4.0-runtime (androidx.browser:browser:1.4.0) and jetified-androidx.browser.browser-1.4.0-runtime (:androidx.browser.browser-1.4.0:)
Duplicate class android.support.customtabs.trusted.ITrustedWebActivityService$Stub found in modules browser-1.4.0-runtime (androidx.browser:browser:1.4.0) and jetified-androidx.browser.browser-1.4.0-runtime (:androidx.browser.browser-1.4.0:)
Duplicate class android.support.customtabs.trusted.ITrustedWebActivityService$Stub$Proxy found in modules browser-1.4.0-runtime (androidx.browser:browser:1.4.0) and jetified-androidx.browser.browser-1.4.0-runtime (:androidx.browser.browser-1.4.0:)
Duplicate class android.support.v4.app.RemoteActionCompatParcelizer found in modules core-1.7.0-runtime (androidx.core:core:1.7.0) and jetified-androidx.core.core-1.7.0-runtime (:androidx.core.core-1.7.0:)
Duplicate class android.support.v4.graphics.drawable.IconCompatParcelizer found in modules core-1.7.0-runtime (androidx.core:core:1.7.0) and jetified-androidx.core.core-1.7.0-runtime (:androidx.core.core-1.7.0:)
Duplicate class android.support.v4.media.MediaBrowserCompat found in modules jetified-androidx.media.media-1.0.0-runtime (:androidx.media.media-1.0.0:) and media-1.0.0-runtime (androidx.media:media:1.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$CallbackHandler found in modules jetified-androidx.media.media-1.0.0-runtime (:androidx.media.media-1.0.0:) and media-1.0.0-runtime (androidx.media:media:1.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$ConnectionCallback found in modules jetified-androidx.media.media-1.0.0-runtime (:androidx.media.media-1.0.0:) and media-1.0.0-runtime (androidx.media:media:1.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$ConnectionCallback$ConnectionCallbackInternal found in modules jetified-androidx.media.media-1.0.0-runtime (:androidx.media.media-1.0.0:) and media-1.0.0-runtime (androidx.media:media:1.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$ConnectionCallback$StubApi21 found in modules jetified-androidx.media.media-1.0.0-runtime (:androidx.media.media-1.0.0:) and media-1.0.0-runtime (androidx.media:media:1.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$CustomActionCallback found in modules jetified-androidx.media.media-1.0.0-runtime (:androidx.media.media-1.0.0:) and media-1.0.0-runtime (androidx.media:media:1.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$CustomActionResultReceiver found in modules jetified-androidx.media.media-1.0.0-runtime (:androidx.media.media-1.0.0:) and media-1.0.0-runtime (androidx.media:media:1.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$ItemCallback found in modules jetified-androidx.media.media-1.0.0-runtime (:androidx.media.media-1.0.0:) and media-1.0.0-runtime (androidx.media:media:1.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$ItemCallback$StubApi23 found in modules jetified-androidx.media.media-1.0.0-runtime (:androidx.media.media-1.0.0:) and media-1.0.0-runtime (androidx.media:media:1.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$ItemReceiver found in modules jetified-androidx.media.media-1.0.0-runtime (:androidx.media.media-1.0.0:) and media-1.0.0-runtime (androidx.media:media:1.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$MediaBrowserImpl found in modules jetified-androidx.media.media-1.0.0-runtime (:androidx.media.media-1.0.0:) and media-1.0.0-runtime (androidx.media:media:1.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$MediaBrowserImplApi21 found in modules jetified-androidx.media.media-1.0.0-runtime (:androidx.media.media-1.0.0:) and media-1.0.0-runtime (androidx.media:media:1.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$MediaBrowserImplApi21$1 found in modules jetified-androidx.media.media-1.0.0-runtime (:androidx.media.media-1.0.0:) and media-1.0.0-runtime (androidx.media:media:1.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$MediaBrowserImplApi21$2 found in modules jetified-androidx.media.media-1.0.0-runtime (:androidx.media.media-1.0.0:) and media-1.0.0-runtime (androidx.media:media:1.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$MediaBrowserImplApi21$3 found in modules jetified-androidx.media.media-1.0.0-runtime (:androidx.media.media-1.0.0:) and media-1.0.0-runtime (androidx.media:media:1.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$MediaBrowserImplApi21$4 found in modules jetified-androidx.media.media-1.0.0-runtime (:androidx.media.media-1.0.0:) and media-1.0.0-runtime (androidx.media:media:1.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$MediaBrowserImplApi21$5 found in modules jetified-androidx.media.media-1.0.0-runtime (:androidx.media.media-1.0.0:) and media-1.0.0-runtime (androidx.media:media:1.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$MediaBrowserImplApi21$6 found in modules jetified-androidx.media.media-1.0.0-runtime (:androidx.media.media-1.0.0:) and media-1.0.0-runtime (androidx.media:media:1.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$MediaBrowserImplApi21$7 found in modules jetified-androidx.media.media-1.0.0-runtime (:androidx.media.media-1.0.0:) and media-1.0.0-runtime (androidx.media:media:1.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$MediaBrowserImplApi23 found in modules jetified-androidx.media.media-1.0.0-runtime (:androidx.media.media-1.0.0:) and media-1.0.0-runtime (androidx.media:media:1.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$MediaBrowserImplApi26 found in modules jetified-androidx.media.media-1.0.0-runtime (:androidx.media.media-1.0.0:) and media-1.0.0-runtime (androidx.media:media:1.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$MediaBrowserImplBase found in modules jetified-androidx.media.media-1.0.0-runtime (:androidx.media.media-1.0.0:) and media-1.0.0-runtime (androidx.media:media:1.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$MediaBrowserImplBase$1 found in modules jetified-androidx.media.media-1.0.0-runtime (:androidx.media.media-1.0.0:) and media-1.0.0-runtime (androidx.media:media:1.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$MediaBrowserImplBase$2 found in modules jetified-androidx.media.media-1.0.0-runtime (:androidx.media.media-1.0.0:) and media-1.0.0-runtime (androidx.media:media:1.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$MediaBrowserImplBase$3 found in modules jetified-androidx.media.media-1.0.0-runtime (:androidx.media.media-1.0.0:) and media-1.0.0-runtime (androidx.media:media:1.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$MediaBrowserImplBase$4 found in modules jetified-androidx.media.media-1.0.0-runtime (:androidx.media.media-1.0.0:) and media-1.0.0-runtime (androidx.media:media:1.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$MediaBrowserImplBase$5 found in modules jetified-androidx.media.media-1.0.0-runtime (:androidx.media.media-1.0.0:) and media-1.0.0-runtime (androidx.media:media:1.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$MediaBrowserImplBase$6 found in modules jetified-androidx.media.media-1.0.0-runtime (:androidx.media.media-1.0.0:) and media-1.0.0-runtime (androidx.media:media:1.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$MediaBrowserImplBase$MediaServiceConnection found in modules jetified-androidx.media.media-1.0.0-runtime (:androidx.media.media-1.0.0:) and media-1.0.0-runtime (androidx.media:media:1.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$MediaBrowserImplBase$MediaServiceConnection$1 found in modules jetified-androidx.media.media-1.0.0-runtime (:androidx.media.media-1.0.0:) and media-1.0.0-runtime (androidx.media:media:1.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$MediaBrowserImplBase$MediaServiceConnection$2 found in modules jetified-androidx.media.media-1.0.0-runtime (:androidx.media.media-1.0.0:) and media-1.0.0-runtime (androidx.media:media:1.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$MediaBrowserServiceCallbackImpl found in modules jetified-androidx.media.media-1.0.0-runtime (:androidx.media.media-1.0.0:) and media-1.0.0-runtime (androidx.media:media:1.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$MediaItem found in modules jetified-androidx.media.media-1.0.0-runtime (:androidx.media.media-1.0.0:) and media-1.0.0-runtime (androidx.media:media:1.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$MediaItem$1 found in modules jetified-androidx.media.media-1.0.0-runtime (:androidx.media.media-1.0.0:) and media-1.0.0-runtime (androidx.media:media:1.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$MediaItem$Flags found in modules jetified-androidx.media.media-1.0.0-runtime (:androidx.media.media-1.0.0:) and media-1.0.0-runtime (androidx.media:media:1.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$SearchCallback found in modules jetified-androidx.media.media-1.0.0-runtime (:androidx.media.media-1.0.0:) and media-1.0.0-runtime (androidx.media:media:1.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$SearchResultReceiver found in modules jetified-androidx.media.media-1.0.0-runtime (:androidx.media.media-1.0.0:) and media-1.0.0-runtime (androidx.media:media:1.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$ServiceBinderWrapper found in modules jetified-androidx.media.media-1.0.0-runtime (:androidx.media.media-1.0.0:) and media-1.0.0-runtime (androidx.media:media:1.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$Subscription found in modules jetified-androidx.media.media-1.0.0-runtime (:androidx.media.media-1.0.0:) and media-1.0.0-runtime (androidx.media:media:1.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$SubscriptionCallback found in modules jetified-androidx.media.media-1.0.0-runtime (:androidx.media.media-1.0.0:) and media-1.0.0-runtime (androidx.media:media:1.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$SubscriptionCallback$StubApi21 found in modules jetified-androidx.media.media-1.0.0-runtime (:androidx.media.media-1.0.0:) and media-1.0.0-runtime (androidx.media:media:1.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompat$SubscriptionCallback$StubApi26 found in modules jetified-androidx.media.media-1.0.0-runtime (:androidx.media.media-1.0.0:) and media-1.0.0-runtime (androidx.media:media:1.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompatApi21 found in modules jetified-androidx.media.media-1.0.0-runtime (:androidx.media.media-1.0.0:) and media-1.0.0-runtime (androidx.media:media:1.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompatApi21$ConnectionCallback found in modules jetified-androidx.media.media-1.0.0-runtime (:androidx.media.media-1.0.0:) and media-1.0.0-runtime (androidx.media:media:1.0.0)
Duplicate class android.support.v4.media.MediaBrowserCompatApi21$Conne<message truncated>
I started a new project, downloaded and installed all packages from the previous project and copied and pasted everything from my old project’s asset folder and that somehow fixed the issue for me. Old project was 2021.3.2f1 and new was 2022.3.37f1. No idea what caused the issue or how it got fixed for me.
I don’t know if this will help anyone, but desperate times call for desperate measures.
I removed Unity’s IAP package completely and instead installed VoxelBusters Cross Platform IAP plugin.
Nothing else worked. Deleting Resolved Android Libraries, deleting gradle and Unity package caches, upgrading and downgrading Unity.
Also, deleting the Android Libraries does work, meaning the build succeeds but your app will crash in runtime.
Hi all,
The build issue is mostly probable to be related to your project itself due to dependencies set in your grade file
To help further we will require the dependency list with packages version and the editor info used
As a starter, I would recommend to update packages to latest, have your project in a clean environment (deleting the Library folder can also do the trick), try to force resolve with the Android resolver, recheck the mainTemplate.gradle file, then build
Hope this will help!
All cases might be different, and it can take some time to understand the issue itself
We are glad to help but again, this is project-specific
I think you’re linking to a different type of problem. It’s not the same error as on this thread and suggests that Facebook SDK and Unity In App Purchasing SDKs don’t play well together. I’ve just removed the Facebook SDK from my project, forced resolve, checked the build.gradle file to make sure all the Facebook references were gone and I still got the same error so it doesn’t look like this issue has anything to do with Facebook SDK.
“A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable“ from your link isn’t the same error we’re getting. Our error is:
A problem occurred configuring project ‘:unityLibrary’.
Cannot change dependencies of dependency configuration ‘:unityLibrary:implementation’ after it has been included in dependency resolution.
Unfortunately that didn’t fix the build error in my project. I wasn’t really sure where to add your line. I already have this in my mainTemplate.gradle file:
I was just trying your second way of writing it.
I thought it was the same error because the version of com.unity.purchasing was automatically updated from 4.11.0 to 4.12.0 and the error message was similar, but I’m sorry I couldn’t be of any help.
The version I’m using is 6000.0.11f1.