Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[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
Assignees
Labels
needs-attention Need Googler's attention type: question

Comments

@Baonguyen-devg
Copy link

[REQUIRED] Please fill in the following fields:

  • Unity editor version: 2023.2.3f1
  • External Dependency Manager version: 1.2.181
  • Source you installed EDM4U: Unity Package Manager
  • Features in External Dependency Manager in use: Android Resolver
  • Plugins SDK in use: Firebase, Google Mobile Ads, Google Sign In
  • Platform you are using the Unity editor on: Windows

SOURCES:

  1. Google Mobile Ads: Google Mobile Ads v9.2.0
  2. Google Sign In: Google Sign in v.1.0.4
  3. Firebase: Firebase v11.7.0

[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:

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:

  1. Deleted the library folder of the project to allow Unity to regenerate all files automatically.
  2. Used Assets > External Dependency Manager > Android Resolver > Delete Resolved Libraries - Force Resolve.
  3. Tested with newer versions of the IAP package.
  4. Installed the latest version of the External Dependency Manager.

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%

@google-oss-bot
Copy link

This issue does not seem to follow the issue template. Make sure you provide all the required information.

@Baonguyen-devg 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 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
@argzdev argzdev removed the new to be triaged label Sep 11, 2024
@argzdev
Copy link
Collaborator

argzdev commented Sep 16, 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?

  1. 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?
  2. Can you update the Firebase version to 12.2.1, and EDM version to 1.2.182?
  3. 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!

@argzdev argzdev added the needs-info Need information for the developer label Sep 16, 2024
@argzdev argzdev self-assigned this Sep 16, 2024
@Baonguyen-devg
Copy link
Author

Baonguyen-devg commented Sep 20, 2024

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

image

image

@google-oss-bot google-oss-bot added needs-attention Need Googler's attention and removed needs-info Need information for the developer labels Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-attention Need Googler's attention type: question
Projects
None yet
Development

No branches or pull requests

3 participants