You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Bug] Build Failure with .aab file due to Execution failed for task ':launcher:checkReleaseDuplicateClasses' after upgrading to Google Play Billing Library 6.0.1 in Unity IAP Package
#708
Open
Baonguyen-devg opened this issue
Sep 11, 2024
· 3 comments
(Please list the full steps to reproduce the issue. Include device logs, Unity logs, and stack traces if available.)
We received a warning from Google Play Console stating that our app must use Google Play Billing Library version 6.0.1 or later. Currently, the IAP package in our app is version 4.11.0, which only supports Google Play Billing Library version 5.2.1. Therefore, we decided to upgrade the IAP package to version 4.12.0 or higher to support Google Play Billing Library version 6.0.1 in Unity. However, when building the Android App Bundle (.aab) file, we encountered the following error:
Note: D:\Game Projects\Team Startup\Jigsaw - revert\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 android.support.v4.app.RemoteActionCompatParcelizer found in modules core-1.5.0-runtime (androidx.core:core:1.5.0) and jetified-androidx.core.core-1.9.0-runtime (:androidx.core.core-1.9.0:)
Duplicate class android.support.v4.graphics.drawable.IconCompatParcelizer found in modules core-1.5.0-runtime (androidx.core:core:1.5.0) and jetified-androidx.core.core-1.9.0-runtime (:androidx.core.core-1.9.0:)
Duplicate class android.support.v4.os.ResultReceiver found in modules core-1.5.0-runtime (androidx.core:core:1.5.0) and jetified-androidx.core.core-1.9.0-runtime (:androidx.core.core-1.9.0:)
Duplicate class android.support.v4.os.ResultReceiver$1 found in modules core-1.5.0-runtime (androidx.core:core:1.5.0) and jetified-androidx.core.core-1.9.0-runtime (:androidx.core.core-1.9.0:)
Duplicate class android.support.v4.os.ResultReceiver$MyResultReceiver found in modules core-1.5.0-runtime (androidx.core:core:1.5.0) and jetified-androidx.core.core-1.9.0-runtime (:androidx.core.core-1.9.0:)
Duplicate class android.support.v4.os.ResultReceiver$MyRunnable found in modules core-1.5.0-runtime (androidx.core:core:1.5.0) and jetified-androidx.core.core-1.9.0-runtime (:androidx.core.core-1.9.0:)
Duplicate class androidx.activity.Cancellable found in modules jetified-activity-1.3.1-runtime (androidx.activity:activity:1.3.1) and jetified-androidx.activity.activity-1.2.0-runtime (:androidx.activity.activity-1.2.0:)
Duplicate class androidx.activity.ComponentActivity found in modules jetified-activity-1.3.1-runtime (androidx.activity:activity:1.3.1) and jetified-androidx.activity.activity-1.2.0-runtime (:androidx.activity.activity-1.2.0:)
Duplicate class androidx.activity.ComponentActivity$1 found in modules jetified-activity-1.3.1-runtime (androidx.activity:activity:1.3.1) and jetified-androidx.activity.activity-1.2.0-runtime (:androidx.activity.activity-1.2.0:)
Duplicate class androidx.activity.ComponentActivity$2 found in modules jetified-activity-1.3.1-runtime (androidx.activity:activity:1.3.1) and jetified-androidx.activity.activity-1.2.0-runtime (:androidx.activity.activity-1.2.0:)
Duplicate class androidx.activity.ComponentActivity$2$1 found in modules jetified-activity-1.3.1-runtime (androidx.activity:activity:1.3.1) and jetified-androidx.activity.activity-1.2.0-runtime (:androidx.activity.activity-1.2.0:)
Duplicate class androidx.activity.ComponentActivity$2$2 found in modules jetified-activity-1.3.1-runtime (androidx.activity:activity:1.3.1) and jetified-androidx.activity.activity-1.2.0-runtime (:androidx.activity.activity-1.2.0:)
Duplicate class androidx.activity.ComponentActivity$3 found in modules jetified-activity-1.3.1-runtime (androidx.activity:activity:1.3.1) and jetified-androidx.activity.activity-1.2.0-runtime (:androidx.activity.activity-1.2.0:)
Duplicate class androidx.activity.ComponentActivity$4 found in modules jetified-activity-1.3.1-runtime (androidx.activity:activity:1.3.1) and jetified-androidx.activity.activity-1.2.0-runtime (:androidx.activity.activity-1.2.0:)
Duplicate class androidx.activity.ComponentActivity$5 found in modules jetified-activity-1.3.1-runtime (androidx.activity:activity:1.3.1) and jetified-androidx.activity.activity-1.2.0-runtime (:androidx.activity.activity-1.2.0:)
Duplicate class androidx.activity.ComponentActivity$NonConfigurationInstances found in modules jetified-activity-1.3.1-runtime (androidx.activity:activity:1.3.1) and jetified-androidx.activity.activity-1.2.0-runtime (:androidx.activity.activity-1.2.0:)
Duplicate class androidx.activity.ImmLeaksCleaner found in modules jetified-activity-1.3.1-runtime (androidx.activity:activity:1.3.1) and jetified-androidx.activity.activity-1.2.0-runtime (:androidx.activity.activity-1.2.0:)
Duplicate class androidx.activity.OnBackPressedCallback found in modules jetified-activity-1.3.1-runtime (androidx.activity:activity:1.3.1) and jetified-androidx.activity.activity-1.2.0-runtime (:androidx.activity.activity-1.2.0:)
Duplicate class androidx.activity.OnBackPressedDispatcher found in modules jetified-activity-1.3.1-runtime (androidx.activity:activity:1.3.1) and jetified-androidx.activity.activity-1.2.0-runtime (:androidx.activity.activity-1.2.0:)
Duplicate class androidx.activity.OnBackPressedDispatcher$LifecycleOnBackPressedCancellable found in modules jetified-activity-1.3.1-runtime (androidx.activity:activity:1.3.1) and jetified-androidx.activity.activity-1.2.0-runtime (:androidx.activity.activity-1.2.0:)
Duplicate class androidx.activity.OnBackPressedDispatcher$OnBackPressedCancellable found in modules jetified-activity-1.3.1-runtime (androidx.activity:activity:1.3.1) and jetified-androidx.activity.activity-1.2.0-runtime (:androidx.activity.activity-1.2.0:)
Duplicate class androidx.activity.OnBackPressedDispatcherOwner found in modules jetified-activity-1.3.1-runtime (androidx.activity:activity:1.3.1) and jetified-androidx.activity.activity-1.2.0-runtime (:androidx.activity.activity-1.2.0:)
Duplicate class androidx.activity.contextaware.ContextAware found in modules jetified-activity-1.3.1-runtime (androidx.activity:activity:1.3.1) and jetified-androidx.activity.activity-1.2.0-runtime (:androidx.activity.activity-1.2.0:)
Duplicate class androidx.activity.contextaware.ContextAwareHelper found in modules jetified-activity-1.3.1-runtime (androidx.activity:activity:1.3.1) and jetified-androidx.activity.activity-1.2.0-runtime (:androidx.activity.activity-1.2.0:)
Duplicate class androidx.activity.contextaware.OnContextAvailableListener found in modules jetified-activity-1.3.1-runtime (androidx.activity:activity:1.3.1) and jetified-androidx.activity.activity-1.2.0-runtime (:androidx.activity.activity-1.2.0:)
Duplicate class androidx.activity.result.ActivityResult found in modules jetified-activity-1.3.1-runtime (androidx.activity:activity:1.3.1) and jetified-androidx.activity.activity-1.2.0-runtime (:androidx.activity.activity-1.2.0:)
Duplicate class androidx.activity.result.ActivityResult$1 found in modules jetified-activity-1.3.1-runtime (androidx.activity:activity:1.3.1) and jetified-androidx.activity.activity-1.2.0-runtime (:androidx.activity.activity-1.2.0:)
Duplicate class androidx.activity.result.ActivityResultCallback found in modules jetified-activity-1.3.1-runtime (androidx.activity:activity:1.3.1) and jetified-androidx.activity.activity-1.2.0-runtime (:androidx.activity.activity-1.2.0:)
Duplicate class androidx.activity.result.ActivityResultCaller found in modules jetified-activity-1.3.1-runtime (androidx.activity:activity:1.3.1) and jetified-androidx.activity.activity-1.2.0-runtime (:androidx.activity.activity-1.2.0:)
Duplicate class androidx.activity.result.ActivityResultLauncher found in modules jetified-activity-1.3.1-runtime (androidx.activity:activity:1.3.1) and jetified-androidx.activity.activity-1.2.0-runtime (:androidx.activity.activity-1.2.0:)
Duplicate class androidx.activity.result.ActivityResultRegistry found in modules jetified-activity-1.3.1-runtime (androidx.activity:activity:1.3.1) and jetified-androidx.activity.activity-1.2.0-runtime (:androidx.activity.activity-1.2.0:)
Duplicate class androidx.activity.result.ActivityResultRegistry$1 found in modules jetified-activity-1.3.1-runtime (androidx.activity:activity:1.3.1) and jetified-androidx.activity.activity-1.2.0-runtime (:androidx.activity.activity-1.2.0:)
Duplicate class androidx.activity.result.ActivityResultRegistry$2 found in modules jetified-activity-1.3.1-runtime (androidx.activity:activity:1.3.1) and jetified-androidx.activity.activity-1.2.0-runtime (:androidx.activity.activity-1.2.0:)
Duplicate class androidx.activity.result.ActivityResultRegistry$3 found in modules jetified-activity-1.3.1-runtime (androidx.activity:activity:1.3.1) and jetified-androidx.activity.activity-1.2.0-runtime (:androidx.activity.activity-1.2.0:)
Duplicate class androidx.activity.result.ActivityResultRegistry$CallbackAndContract found in modules jetified-activity-1.3.1-runtime (androidx.activity:activity:1.3.1) and jetified-androidx.activity.activity-1.2.0-runtime (:androidx.activity.activity-1.2.0:)
Duplicate class androidx.activity.result.ActivityResultRegistry$LifecycleContainer found in modules jetified-activity-1.3.1-runtime (androidx.activity:activity:1.3.1) and jetified-androidx.activity.activity-1.2.0-runtime (:androidx.activity.activity-1.2.0:)
Duplicate class androidx.activity.result.ActivityResultRegistryOwner found in modules jetified-activity-1.3.1-runtime (androidx.activity:activity:1.3.1) and jetified-androidx.activity.activity-1.2.0-runtime (:androidx.activity.activity-1.2.0:)
Duplicate class androidx.activity.result.IntentSenderRequest found in modules jetified-activity-1.3.1-runtime (androidx.activity:activity:1.3.1) and jetified-androidx.activity.activity-1.2.0-runtime (:androidx.activity.activity-1.2.0:)
Duplicate class androidx.activity.result.IntentSenderRequest$1 found in modules jetified-activity-1.3.1-runtime (androidx.activity:activity:1.3.1) and jetified-androidx.activity.activity-1.2.0-runtime (:androidx.activity.activity-1.2.0:)
Duplicate class androidx.activity.result.IntentSenderRequest$Builder found in modules jetified-activity-1.3.1-runtime (androidx.activity:activity:1.3.1) and jetified-androidx.activity.activity-1.2.0-runtime (:androidx.activity.activity-1.2.0:)
Duplicate class androidx.activity.result.contract.ActivityResultContract found in modules jetified-activity-1.3.1-runtime (androidx.activity:activity:1.3.1) and jetified-androidx.activity.activity-1.2.0-runtime (:androidx.activity.activity-1.2.0:)
Duplicate class androidx.activity.result.contract.ActivityResultContract$SynchronousResult found in modules jetified-activity-1.3.1-runtime (androidx.activity:activity:1.3.1) and jetified-androidx.activity.activity-1.2.0-runtime (:androidx.activity.activity-1.2.0:)
Duplicate class androidx.activity.result.contract.ActivityResultContracts found in modules jetified-activity-1.3.1-runtime (androidx.activity:activity:1.3.1) and jetified-androidx.activity.activity-1.2.0-runtime (:androidx.activity.activity-1.2.0:)
Duplicate class androidx.activity.result.contract.ActivityResultContracts$CreateDocument found in modules jetified-activity-1.3.1-runtime (androidx.activity:activity:1.3.1) and jetified-androidx.activity.activity-1.2.0-runtime (:androidx.activity.activity-1.2.0:)
Duplicate class androidx.activity.result.contract.ActivityResultContracts$GetContent found in modules jetified-activity-1.3.1-runtime (androidx.activity:activity:1.3.1) and jetified-androidx.activity.activity-1.2.0-runtime (:androidx.activity.activity-1.2.0:)
Duplicate class androidx.activity.result.contract.ActivityResultContracts$GetMultipleContents found in modules jetified-activity-1.3.1-runtime (androidx.activity:activity:1.3.1) and jetified-androidx.activity.activity-1.2.0-runtime (:androidx.activity.activity-1.2.0:)
Duplicate class androidx.activity.result.contract.ActivityResultContracts$OpenDocument found in modules jetified-activity-1.3.1-runtime (androidx.activity:activity:1.3.1) and jetified-androidx.activity.activity-1.2.0-runtime (:androidx.activity.activity-1.2.0:)
Duplicate class androidx.activity.result.contract.ActivityResultContracts$OpenDocumentTree found in modules jetified-activity-1.3.1-runtime (androidx.activity:activity:1.3.1) and jetified-androidx.activity.activity-1.2.0-runtime (:androidx.activity.activity-1.2.0:)
Duplicate class androidx.activity.result.contract.ActivityResultContracts$OpenMultipleDocuments found in modules jetified-activity-1.3.1-runtime (androidx.activity:activity:1.3.1) and jetified-androidx.activity.activity-1.2.0-runtime (:androidx.activity.activity-1.2.0:)
Duplicate class androidx.activity.result.contract.ActivityResultContracts$PickContact found in modules jetified-activity-1.3.1-runtime (androidx.activity:activity:1.3.1) and jetified-androidx.activity.activity-1.2.0-runtime (:androidx.activity.activity-1.2.0:)
Duplicate class androidx.activity.result.contract.ActivityResultContracts$RequestMultiplePermissions found in modules jetified-activity-1.3.1-runtime (androidx.activity:activity:1.3.1) and jetified-androidx.activity.activity-1.2.0-runtime (:androidx.activity.activity-1.2.0:)
Duplicate class androidx.activity.result.contract.ActivityResultContracts$RequestPermission found in modules jetified-activity-1.3.1-runtime (androidx.activity:activity:1.3.1) and jetified-androidx.activity.activity-1.2.0-runtime (:androidx.activity.activity-1.2.0:)
Duplicate class androidx.activity.result.contract.ActivityResultContracts$StartActivityForResult found in modules jetified-activity-1.3.1-runtime (androidx.activity:activity:1.3.1) and jetified-androidx.activity.activity-1.2.0-runtime (:androidx.activity.activity-1.2.0:)
Duplicate class androidx.activity.result.contract.ActivityResultContracts$StartIntentSenderForResult found in modules jetified-activity-1.3.1-runtime (androidx.activity:activity:1.3.1) and jetified-androidx.activity.activity-1.2.0-runtime (:androidx.activity.activity-1.2.0:)
Duplicate class androidx.activity.result.contract.ActivityResultContracts$TakePicture found in modules jetified-activity-1.3.1-runtime (androidx.activity:activity:1.3.1) and jetified-androidx.activity.activity-1.2.0-runtime (:androidx.activity.activity-1.2.0:)
Duplicate class androidx.activity.result.contract.ActivityResultContracts$TakePicturePreview found in modules jetified-activity-1.3.1-runtime (androidx.activity:activity:1.3.1) and jetified-androidx.activity.activity-1.2.0-runtime (:androidx.activity.activity-1.2.0:)
Duplicate class androidx.activity.result.contract.ActivityResultContracts$TakeVideo found in modules jetified-activity-1.3.1-runtime (androidx.activity:activity:1.3.1) and jetified-androidx.activity.activity-1.2.0-runtime (:androidx.activity.activity-1.2.0:)
Duplicate class androidx.arch.core.executor.ArchTaskExecutor found in modules core-runtime-2.1.0-runtime (androidx.arch.core:core-runtime:2.1.0) and jetified-androidx.arch.core.core-runtime-2.1.0-runtime (:androidx.arch.core.core-runtime-2.1.0:)
Duplicate class androidx.arch.core.executor.ArchTaskExecutor$1 found in modules core-runtime-2.1.0-runtime (androidx.arch.core:core-runtime:2.1.0) and jetified-androidx.arch.core.core-runtime-2.1.0-runtime (:androidx.arch.core.core-runtime-2.1.0:)
Duplicate class androidx.arch.core.executor.ArchTaskExecutor$2 found in modules core-runtime-2.1.0-runtime (androidx.arch.core:core-runtime:2.1.0) and jetified-androidx.arch.core.core-runtime-2.1.0-runtime (:androidx.arch.core.core-runtime-2.1.0:)
Duplicate class androidx.arch.core.executor.DefaultTaskExecutor found in modules core-runtime-2.1.0-runtime (androidx.arch.core:core-runtime:2.1.0) and jetified-androidx.arch.core.core-runtime-2.1.0-runtime (:androidx.arch.core.core-runtime-2.1.0:)
Duplicate class androidx.arch.core.executor.DefaultTaskExecutor$1 found in modules core-runtime-2.1.0-runtime (androidx.arch.core:core-runtime:2.1.0) and jetified-androidx.arch.core.core-runtime-2.1.0-runtime (:androidx.arch.core.core-runtime-2.1.0:)
Duplicate class androidx.arch.core.executor.TaskExecutor found in modules core-runtime-2.1.0-runtime (androidx.arch.core:core-runtime:2.1.0) and jetified-androidx.arch.core.core-runtime-2.1.0-runtime (:androidx.arch.core.core-runtime-2.1.0:)
Duplicate class androidx.arch.core.internal.FastSafeIterableMap found in modules core-common-2.1.0 (androidx.arch.core:core-common:2.1.0) and jetified-androidx.arch.core.core-common-2.1.0 (androidx.arch.<message truncated>
I have tried several methods to resolve the issue, but the error persists when building the project. Here’s what I’ve attempted so far:
Deleted the library folder of the project to allow Unity to regenerate all files automatically.
Used Assets > External Dependency Manager > Android Resolver > Delete Resolved Libraries - Force Resolve.
Tested with newer versions of the IAP package.
Installed the latest version of the External Dependency Manager.
This issue does not seem to follow the issue template. Make sure you provide all the required information.
Baonguyen-devg
changed the title
[Bug] Build Failure with .aab File Due to 'Execution failed for task :launcher ' After Upgrading to Google Play Billing Library 6.0.1 in Unity IAP Package
[Bug] Build Failure with .aab file due to 'Execution failed for task :launcher ' After Upgrading to Google Play Billing Library 6.0.1 in Unity IAP Package
Sep 11, 2024
Baonguyen-devg
changed the title
[Bug] Build Failure with .aab file due to 'Execution failed for task :launcher ' After Upgrading to Google Play Billing Library 6.0.1 in Unity IAP Package
[Bug] Build Failure with .aab file due to Execution failed for task ':launcher:checkReleaseDuplicateClasses' after upgrading to Google Play Billing Library 6.0.1 in Unity IAP Package
Sep 11, 2024
Thanks for reaching out, @Baonguyen-devg. I tried creating a clean project and adding all the dependencies you're using, and also deleting the Library folder, however, I'm able to build the app without errors. I'm guessing there might be a difference in my configuration vs yours. Could you answer a few questions below?
According to the archives, I don't see any Unity Editor with version 2023.2.3f1. That said, in case you're using an older version, could you update to the latest version 2023.2.20f1?
Can you update the Firebase version to 12.2.1, and EDM version to 1.2.182?
Lastly, there was a duplicate issue similar to this in the past. Could you try the solution provided here, and see if it changes anything? Thanks!
Sorry @argzdev for the delayed response. I’ve tried upgrading the project’s editor version to the latest one, updating Firebase to version 12.2.1, updating EDM to version 1.2.182, and using every solution I could find online. However, the build still fails with the same error. I'm suspecting the issue might be related to the IAP package, so I've submitted a ticket to them for further investigation discussions.unity.com - Build Failed After Ugrading To IAP 4.12.*
You can find details about Unity version 2023.2.3 and its release notes at this link: Unity 2023.2.3 Release Notes.
Here are the options I have selected in android solver setting and publishing Setting: Build
[REQUIRED] Please fill in the following fields:
SOURCES:
[REQUIRED] Please describe the issue here:
(Please list the full steps to reproduce the issue. Include device logs, Unity logs, and stack traces if available.)
We received a warning from Google Play Console stating that our app must use Google Play Billing Library version 6.0.1 or later. Currently, the IAP package in our app is version 4.11.0, which only supports Google Play Billing Library version 5.2.1. Therefore, we decided to upgrade the IAP package to version 4.12.0 or higher to support Google Play Billing Library version 6.0.1 in Unity. However, when building the Android App Bundle (.aab) file, we encountered the following error:
I have tried several methods to resolve the issue, but the error persists when building the project. Here’s what I’ve attempted so far:
However, none of these solutions have worked. We had to request an extension from Google Play Console for the warning, pushing the deadline to November. It seems that some other developers are also encountering similar issues as we are
[Android] Build fails with Error "A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable" when using In-App Purchasing and Facebook SDK
669 653
Issue repro rate: 100%
The text was updated successfully, but these errors were encountered: