Skip to content

[Bug] Unable to build AAB with enabled setting "Split application binary" #661

Open
@streaminspace

Description

@streaminspace

[REQUIRED] Please fill in the following fields:

  • Unity editor version: 2022, 2023
  • Firebase Unity SDK version: 10.5, 10.6, maybe also early releases
  • Source you installed the SDK: .unitypackage
  • Problematic Firebase Component: I think any ( for sure Analytics, I used it for tests)
  • Other Firebase Components in use: no
  • Additional SDKs you are using: no
  • Platform you are using the Unity editor on: Windows
  • Platform you are targeting: Android
  • Scripting Runtime: IL2CPP
  • Pre-built SDK from the website or open-source from this repo: website

[REQUIRED] Please describe the issue here:

When I'm trying to build an AAB file with the enabled setting "Split application binary" I'm facing errors, telling me about duplicate classes.

Im not sure, if this bug is related to Firebase SDK or to Unity. If this issue is not related to the Firebase SDK - tell me, ill create a ticket somewhere on the Unity side.
Below is additional information to help understand the problem.

I tried to reproduce it on different Unity versions :
2021 - Success.
2022, 2023 - FAIL.

I tried to reproduce it with different settings :
Build AAB, "Split application binary" is enabled - FAIL.
Build AAB, "Split application binary" is disabled - Success.
Build APK, "Split application binary" is enabled - Success.
Build APK, "Split application binary" is disabled - Success.

Log :

`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.INotificationSideChannel found in modules androidx.core.core-1.2.0-runtime (:androidx.core.core-1.2.0:) and support-compat-26.1.0-runtime (com.android.support:support-compat:26.1.0)
Duplicate class android.support.v4.app.INotificationSideChannel$Stub found in modules androidx.core.core-1.2.0-runtime (:androidx.core.core-1.2.0:) and support-compat-26.1.0-runtime (com.android.support:support-compat:26.1.0)
Duplicate class android.support.v4.app.INotificationSideChannel$Stub$Proxy found in modules androidx.core.core-1.2.0-runtime (:androidx.core.core-1.2.0:) and support-compat-26.1.0-runtime (com.android.support:support-compat:26.1.0)
Duplicate class android.support.v4.os.IResultReceiver found in modules androidx.core.core-1.2.0-runtime (:androidx.core.core-1.2.0:) and support-compat-26.1.0-runtime (com.android.support:support-compat:26.1.0)
Duplicate class android.support.v4.os.IResultReceiver$Stub found in modules androidx.core.core-1.2.0-runtime (:androidx.core.core-1.2.0:) and support-compat-26.1.0-runtime (com.android.support:support-compat:26.1.0)
Duplicate class android.support.v4.os.IResultReceiver$Stub$Proxy found in modules androidx.core.core-1.2.0-runtime (:androidx.core.core-1.2.0:) and support-compat-26.1.0-runtime (com.android.support:support-compat:26.1.0)
Duplicate class android.support.v4.os.ResultReceiver found in modules androidx.core.core-1.2.0-runtime (:androidx.core.core-1.2.0:) and support-compat-26.1.0-runtime (com.android.support:support-compat:26.1.0)
Duplicate class android.support.v4.os.ResultReceiver$1 found in modules androidx.core.core-1.2.0-runtime (:androidx.core.core-1.2.0:) and support-compat-26.1.0-runtime (com.android.support:support-compat:26.1.0)
Duplicate class android.support.v4.os.ResultReceiver$MyResultReceiver found in modules androidx.core.core-1.2.0-runtime (:androidx.core.core-1.2.0:) and support-compat-26.1.0-runtime (com.android.support:support-compat:26.1.0)
Duplicate class android.support.v4.os.ResultReceiver$MyRunnable found in modules androidx.core.core-1.2.0-runtime (:androidx.core.core-1.2.0:) and support-compat-26.1.0-runtime (com.android.support:support-compat:26.1.0)
Duplicate class com.google.android.gms.actions.ItemListIntents found in modules com.google.android.gms.play-services-basement-18.1.0-runtime (:com.google.android.gms.play-services-basement-18.1.0:) and play-services-basement-16.0.1-runtime (com.google.android.gms:play-services-basement:16.0.1)
Duplicate class com.google.android.gms.actions.NoteIntents found in modules com.google.android.gms.play-services-basement-18.1.0-runtime (:com.google.android.gms.play-services-basement-18.1.0:) and play-services-basement-16.0.1-runtime (com.google.android.gms:play-services-basement:16.0.1)
Duplicate class com.google.android.gms.actions.ReserveIntents found in modules com.google.android.gms.play-services-basement-18.1.0-runtime (:com.google.android.gms.play-services-basement-18.1.0:) and play-services-basement-16.0.1-runtime (com.google.android.gms:play-services-basement:16.0.1)
Duplicate class com.google.android.gms.actions.SearchIntents found in modules com.google.android.gms.play-services-basement-18.1.0-runtime (:com.google.android.gms.play-services-basement-18.1.0:) and play-services-basement-16.0.1-runtime (com.google.android.gms:play-services-basement:16.0.1)
Duplicate class com.google.android.gms.common.AccountPicker found in modules com.google.android.gms.play-services-basement-18.1.0-runtime (:com.google.android.gms.play-services-basement-18.1.0:) and play-services-basement-16.0.1-runtime (com.google.android.gms:play-services-basement:16.0.1)
Duplicate class com.google.android.gms.common.BlockingServiceConnection found in modules com.google.android.gms.play-services-basement-18.1.0-runtime (:com.google.android.gms.play-services-basement-18.1.0:) and play-services-basement-16.0.1-runtime (com.google.android.gms:play-services-basement:16.0.1)
Duplicate class com.google.android.gms.common.ConnectionResult found in modules com.google.android.gms.play-services-basement-18.1.0-runtime (:com.google.android.gms.play-services-basement-18.1.0:) and play-services-basement-16.0.1-runtime (com.google.android.gms:play-services-basement:16.0.1)
Duplicate class com.google.android.gms.common.Feature found in modules com.google.android.gms.play-services-basement-18.1.0-runtime (:com.google.android.gms.play-services-basement-18.1.0:) and play-services-basement-16.0.1-runtime (com.google.android.gms:play-services-basement:16.0.1)
Duplicate class com.google.android.gms.common.FirstPartyScopes found in modules com.google.android.gms.play-services-basement-18.1.0-runtime (:com.google.android.gms.play-services-basement-18.1.0:) and play-services-basement-16.0.1-runtime (com.google.android.gms:play-services-basement:16.0.1)
Duplicate class com.google.android.gms.common.GoogleApiAvailabilityLight found in modules com.google.android.gms.play-services-basement-18.1.0-runtime (:com.google.android.gms.play-services-basement-18.1.0:) and play-services-basement-16.0.1-runtime (com.google.android.gms:play-services-basement:16.0.1)
Duplicate class com.google.android.gms.common.GooglePlayServicesNotAvailableException found in modules com.google.android.gms.play-services-basement-18.1.0-runtime (:com.google.android.gms.play-services-basement-18.1.0:) and play-services-basement-16.0.1-runtime (com.google.android.gms:play-services-basement:16.0.1)
Duplicate class com.google.android.gms.common.GooglePlayServicesRepairableException found in modules com.google.android.gms.play-services-basement-18.1.0-runtime (:com.google.android.gms.play-services-basement-18.1.0:) and play-services-basement-16.0.1-runtime (com.google.android.gms:play-services-basement:16.0.1)
Duplicate class com.google.android.gms.common.GooglePlayServicesUtilLight found in modules com.google.android.gms.play-services-basement-18.1.0-runtime (:com.google.android.gms.play-services-basement-18.1.0:) and play-services-basement-16.0.1-runtime (com.google.android.gms:play-services-basement:16.0.1)
Duplicate class com.google.android.gms.common.GoogleSignatureVerifier found in modules com.google.android.gms.play-services-basement-18.1.0-runtime (:com.google.android.gms.play-services-basement-18.1.0:) and play-services-basement-16.0.1-runtime (com.google.android.gms:play-services-basement:16.0.1)
Duplicate class com.google.android.gms.common.ProGuardCanary found in modules com.google.android.gms.play-services-basement-18.1.0-runtime (:com.google.android.gms.play-services-basement-18.1.0:) and play-services-basement-16.0.1-runtime (com.google.android.gms:play-services-basement:16.0.1)
Duplicate class com.google.android.gms.common.Scopes found in modules com.google.android.gms.play-services-basement-18.1.0-runtime (:com.google.android.gms.play-services-basement-18.1.0:) and play-services-basement-16.0.1-runtime (com.google.android.gms:play-services-basement:16.0.1)
Duplicate class com.google.android.gms.common.UserRecoverableException found in modules com.google.android.gms.play-services-basement-18.1.0-runtime (:com.google.android.gms.play-services-basement-18.1.0:) and play-services-basement-16.0.1-runtime (com.google.android.gms:play-services-basement:16.0.1)
Duplicate class com.google.android.gms.common.annotation.KeepForSdk found in modules com.google.android.gms.play-services-basement-18.1.0-runtime (:com.google.android.gms.play-services-basement-18.1.0:) and play-services-basement-16.0.1-runtime (com.google.android.gms:play-services-basement:16.0.1)
Duplicate class com.google.android.gms.common.annotation.KeepForSdkWithFieldsAndMethods found in modules com.google.android.gms.play-services-basement-18.1.0-runtime (:com.google.android.gms.play-services-basement-18.1.0:) and play-services-basement-16.0.1-runtime (com.google.android.gms:play-services-basement:16.0.1)
Duplicate class com.google.android.gms.common.annotation.KeepForSdkWithMembers found in modules com.google.android.gms.play-services-basement-18.1.0-runtime (:com.google.android.gms.play-services-basement-18.1.0:) and play-services-basement-16.0.1-runtime (com.google.android.gms:play-services-basement:16.0.1)
Duplicate class com.google.android.gms.common.annotation.KeepName found in modules com.google.android.gms.play-services-basement-18.1.0-runtime (:com.google.android.gms.play-services-basement-18.1.0:) and play-services-basement-16.0.1-runtime (com.google.android.gms:play-services-basement:16.0.1)
Duplicate class com.google.android.gms.common.api.ApiException found in modules com.google.android.gms.play-services-basement-18.1.0-runtime (:com.google.android.gms.play-services-basement-18.1.0:) and play-services-basement-16.0.1-runtime (com.google.android.gms:play-services-basement:16.0.1)
Duplicate class com.google.android.gms.common.api.CommonStatusCodes found in modules com.google.android.gms.play-services-basement-18.1.0-runtime (:com.google.android.gms.play-services-basement-18.1.0:) and play-services-basement-16.0.1-runtime (com.google.android.gms:play-services-basement:16.0.1)
Duplicate class com.google.android.gms.common.api.Releasable found in modules com.google.android.gms.play-services-basement-18.1.0-runtime (:com.google.android.gms.play-services-basement-18.1.0:) and play-services-basement-16.0.1-runtime (com.google.android.gms:play-services-basement:16.0.1)
Duplicate class com.google.android.gms.common.api.ResolvableApiException found in modules com.google.android.gms.play-services-basement-18.1.0-runtime (:com.google.android.gms.play-services-basement-18.1.0:) and play-services-basement-16.0.1-runtime (com.google.android.gms:play-services-basement:16.0.1)
Duplicate class com.google.android.gms.common.api.ResolvingResultCallbacks found in modules com.google.android.gms.play-services-basement-18.1.0-runtime (:com.google.android.gms.play-services-basement-18.1.0:) and play-services-basement-16.0.1-runtime (com.google.android.gms:play-services-basement:16.0.1)
Duplicate class com.google.android.gms.common.api.Response found in modules com.google.android.gms.play-services-basement-18.1.0-runtime (:com.google.android.gms.play-services-basement-18.1.0:) and play-services-basement-16.0.1-runtime (com.google.android.gms:play-services-basement:16.0.1)
Duplicate class com.google.android.gms.common.api.Result found in modules com.google.android.gms.play-services-basement-18.1.0-runtime (:com.google.android.gms.play-services-basement-18.1.0:) and play-services-basement-16.0.1-runtime (com.google.android.gms:play-services-basement:16.0.1)
Duplicate class com.google.android.gms.common.api.ResultCallback found in modules com.google.android.gms.play-services-basement-18.1.0-runtime (:com.google.android.gms.play-services-basement-18.1.0:) and play-services-basement-16.0.1-runtime (com.google.android.gms:play-services-basement:16.0.1)
Duplicate class com.google.android.gms.common.api.ResultCallbacks found in modules com.google.android.gms.play-services-basement-18.1.0-runtime (:com.google.android.gms.play-services-basement-18.1.0:) and play-services-basement-16.0.1-runtime (com.google.android.gms:play-services-basement:16.0.1)
Duplicate class com.google.android.gms.common.api.Scope found in modules com.google.android.gms.play-services-basement-18.1.0-runtime (:com.google.android.gms.play-services-basement-18.1.0:) and play-services-basement-16.0.1-runtime (com.google.android.gms:play-services-basement:16.0.1)
Duplicate class com.google.android.gms.common.api.Status found in modules com.google.android.gms.play-services-basement-18.1.0-runtime (:com.google.android.gms.play-services-basement-18.1.0:) and play-services-basement-16.0.1-runtime (com.google.android.gms:play-services-basement:16.0.1)
Duplicate class com.google.android.gms.common.api.UnsupportedApiCallException found in modules com.google.android.gms.play-services-basement-18.1.0-runtime (:com.google.android.gms.play-services-basement-18.1.0:) and play-services-basement-16.0.1-runtime (com.google.android.gms:play-services-basement:16.0.1)
Duplicate class com.google.android.gms.common.api.internal.BackgroundDetector found in modules com.google.android.gms.play-services-basement-18.1.0-runtime (:com.google.android.gms.play-services-basement-18.1.0:) and play-services-basement-16.0.1-runtime (com.google.android.gms:play-services-basement:16.0.1)
Duplicate class com.google.android.gms.common.api.internal.BackgroundDetector$BackgroundStateChangeListener found in modules com.google.android.gms.play-services-basement-18.1.0-runtime (:com.google.android.gms.play-services-basement-18.1.0:) and play-services-basement-16.0.1-runtime (com.google.android.gms:play-services-basement:16.0.1)
Duplicate class com.google.android.gms.common.api.internal.GoogleServices found in modules com.google.android.gms.play-services-basement-18.1.0-runtime (:com.google.android.gms.play-services-basement-18.1.0:) and play-services-basement-16.0.1-runtime (com.google.android.gms:play-services-basement:16.0.1)
Duplicate class com.google.android.gms.common.api.internal.LifecycleActivity found in modules com.google.android.gms.play-services-basement-18.1.0-runtime (:com.google.android.gms.play-services-basement-18.1.0:) and play-services-basement-16.0.1-runtime (com.google.android.gms:play-services-basement:16.0.1)
Duplicate class com.google.android.gms.common.api.internal.LifecycleCallback found in modules com.google.android.gms.play-services-basement-18.1.0-runtime (:com.google.android.gms.play-services-basement-18.1.0:) and play-services-basement-16.0.1-runtime (com.google.android.gms:play-services-basement:16.0.1)
Duplicate class com.google.android.gms.common.api.internal.LifecycleFragment found in modules com.google.android.gms.play-services-basement-18.1.0-runtime (:com.google.android.gms.play-services-basement-18.1.0:) and play-services-basement-16.0.1-runtime (com.google.android.gms:play-services-basement:16.0.1)
Duplicate class com.google.android.gms.common.api.internal.StatusExceptionMapper found in modules com.google.android.gms.play-services-basement-18.1.0-runtime (:com.google.android.gms.play-services-basement-18.1.0:) and play-services-basement-16.0.1-runtime (com.google.android.gms:play-services-basement:16.0.1)
Duplicate class com.google.android.gms.common.api.internal.zza found in modules com.google.android.gms.play-services-basement-18.1.0-runtime (:com.google.android.gms.play-services-basement-18.1.0:) and play-services-basement-16.0.1-runtime (com.google.android.gms:play-services-basement:16.0.1)
Duplicate class com.google.android.gms.common.api.internal.zzb found in modules com.google.android.gms.play-services-basement-18.1.0-runtime (:com.google.android.gms.play-services-basement-18.1.0:) and play-services-basement-16.0.1-runtime (com.google.android.gms:play-services-basement:16.0.1)`

Steps to reproduce:

  1. Create a new Unity android project
  2. Add Firebase Analytics component.
  3. In player settings enable "Split application binary"
  4. In build settings enable "Build App Bundle"
  5. In build settings press the "Build" button

Relevant Code:

sc

Metadata

Metadata

Assignees

No one assigned

    Labels

    blocked-by-dependenciesIssues which is blocked by native Android/iOS SDK, backend or third-party dependencies.edm4uIssue related to External Dependency Manager for Unitytype: bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions