firebase-unity-sdk
firebase-unity-sdk copied to clipboard
[Bug] Unable to build AAB with enabled setting "Split application binary"
[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:
- Create a new Unity android project
- Add Firebase Analytics component.
- In player settings enable "Split application binary"
- In build settings enable "Build App Bundle"
- In build settings press the "Build" button
Relevant Code:
Hi @streaminspace,
Thanks for reporting this issue. I was able to reproduce this issue on my end using version 10.6.0 of the SDK on a 2023 version of the Unity editor. That said, I'll be relaying my observations to the team, and I'll let you know of any updates via this thread. For now, let me mark this as a bug.
Hello, @paulinon Thank you, i'll be waiting for your answer!
Hi @streaminspace
A couple of questions:
- Which specific Unity
2022
and2023
version are you using? I know there is a major change in behavior from2022.1
to2022.2
, and from2022
to2023
. - Could you try to enable
Custom Main Gradle Template
andCustom Gradle Properties Template
and see if it resolve the issue?
Shawn
I am experiencing the same issue.
I am on Unity 2022.2.13f.
I have both custom main gradle template and custom gradle properties enabled.
I get the exact problem [streaminspace] had.
I then manually deleted androidx.core.core and androidx.media (I had a duplicate error on this one as well) Also changed the play-services-basement to target the 16.01 version in AndroidResolverDependencies.
This got me past the duplicate class error however i then got this error:
`* What went wrong: Execution failed for task ':launcher:mergeReleaseResources'.
Could not resolve all files for configuration ':launcher:releaseRuntimeClasspath'. Could not find com.google.firebase:firebase-analytics-unity:10.7.0. Searched in the following locations: - https://dl.google.com/dl/android/maven2/com/google/firebase/firebase-analytics-unity/10.7.0/firebase-analytics-unity-10.7.0.pom - https://repo.maven.apache.org/maven2/com/google/firebase/firebase-analytics-unity/10.7.0/firebase-analytics-unity-10.7.0.pom - file:/Users/.../Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/libs/firebase-analytics-unity-10.7.0.jar - file:/Users/.../Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/libs/firebase-analytics-unity.jar Required by: project :launcher > project :unityLibrary Could not find com.google.firebase:firebase-app-unity:10.7.0. Searched in the following locations: - https://dl.google.com/dl/android/maven2/com/google/firebase/firebase-app-unity/10.7.0/firebase-app-unity-10.7.0.pom - https://repo.maven.apache.org/maven2/com/google/firebase/firebase-app-unity/10.7.0/firebase-app-unity-10.7.0.pom - file:/Users/.../Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/libs/firebase-app-unity-10.7.0.jar - file:/Users/.../Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/libs/firebase-app-unity.jar Required by: project :launcher > project :unityLibrary Could not find com.google.firebase:firebase-config-unity:10.7.0. Searched in the following locations: - https://dl.google.com/dl/android/maven2/com/google/firebase/firebase-config-unity/10.7.0/firebase-config-unity-10.7.0.pom - https://repo.maven.apache.org/maven2/com/google/firebase/firebase-config-unity/10.7.0/firebase-config-unity-10.7.0.pom - file:/Users/...2/Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/libs/firebase-config-unity-10.7.0.jar - file:/Users/.../Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/libs/firebase-config-unity.jar Required by: project :launcher > project :unityLibrary
-
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
-
Get more help at https://help.gradle.org`
Do please let me know any way to get around this or if you need any more information!
@chkuang-g Saw you pushed a new update to the External Dependancy Manager Repo, will this solve the above issues?
When would we be able to get the new version?
@chkuang-g Hello, sorry for the long reply time.
Currently, I'm using another PC and can not tell which exactly Unity 2022 version was used for the first tests. My current pc is installed 2022.2.1f and Im not facing any issues during the build, strange.. ill tell you the version that was used for the first tests after a few days. But on 2023 still reproduced
Unity version: 2023.1.0b11 Firebase SDK: 10.7.0 Custom Main Gradle Template and Custom Gradle Properties Template are enabled.
Log:
`FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
- What went wrong: Execution failed for task ':launcher:mapReleaseSourceSetPaths'.
Could not resolve all files for configuration ':launcher:releaseRuntimeClasspath'. Could not find com.google.firebase:firebase-analytics-unity:10.7.0. Searched in the following locations: - https://dl.google.com/dl/android/maven2/com/google/firebase/firebase-analytics-unity/10.7.0/firebase-analytics-unity-10.7.0.pom - https://repo.maven.apache.org/maven2/com/google/firebase/firebase-analytics-unity/10.7.0/firebase-analytics-unity-10.7.0.pom - file:/C:/Users/msacc/2023b1/Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/libs/firebase-analytics-unity-10.7.0.jar - file:/C:/Users/msacc/2023b1/Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/libs/firebase-analytics-unity.jar Required by: project :launcher > project :unityLibrary Could not find com.google.firebase:firebase-app-unity:10.7.0. Searched in the following locations: - https://dl.google.com/dl/android/maven2/com/google/firebase/firebase-app-unity/10.7.0/firebase-app-unity-10.7.0.pom - https://repo.maven.apache.org/maven2/com/google/firebase/firebase-app-unity/10.7.0/firebase-app-unity-10.7.0.pom - file:/C:/Users/msacc/2023b1/Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/libs/firebase-app-unity-10.7.0.jar - file:/C:/Users/msacc/2023b1/Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/libs/firebase-app-unity.jar Required by: project :launcher > project :unityLibrary
- Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. ==============================================================================
2: Task failed with an exception.
- What went wrong: Execution failed for task ':unityLibrary:generateReleaseRFile'.
Could not resolve all files for configuration ':unityLibrary:releaseCompileClasspath'. Could not find com.google.firebase:firebase-analytics-unity:10.7.0. Required by: project :unityLibrary Could not find com.google.firebase:firebase-app-unity:10.7.0. Required by: project :unityLibrary
- Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. ==============================================================================
- Get more help at https://help.gradle.org
BUILD FAILED in 3s
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&) `
@chkuang-g About Unity 2022 versions. I can reproduce it on 2022.2.12f1 version.. So on the older version (2022.2.1f ) everything is okay, on the newer (2022.2.12f1 or 2022.2.13f , as @RaoulRb12 mentioned above) not okay.
Logs are the same
Unity version: 2022.2.12f1 Firebase SDK: 10.7.0 Custom Main Gradle Template and Custom Gradle Properties Template are enabled.
Logs: `FAILURE: Build completed with 2 failures. 1: Task failed with an exception.
- What went wrong: Execution failed for task ':launcher:mergeReleaseResources'.
Could not resolve all files for configuration ':launcher:releaseRuntimeClasspath'. Could not find com.google.firebase:firebase-analytics-unity:10.7.0. Searched in the following locations: - https://dl.google.com/dl/android/maven2/com/google/firebase/firebase-analytics-unity/10.7.0/firebase-analytics-unity-10.7.0.pom - https://repo.maven.apache.org/maven2/com/google/firebase/firebase-analytics-unity/10.7.0/firebase-analytics-unity-10.7.0.pom Required by: project :launcher > project :unityLibrary Could not find com.google.firebase:firebase-app-unity:10.7.0. Required by: project :launcher > project :unityLibrary
- Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. ============================================================================== 2: Task failed with an exception.
- What went wrong: Execution failed for task ':unityLibrary:generateReleaseRFile'.
Could not resolve all files for configuration ':unityLibrary:releaseCompileClasspath'. Could not find com.google.firebase:firebase-analytics-unity:10.7.0. Required by: project :unityLibrary Could not find com.google.firebase:firebase-app-unity:10.7.0. Required by: project :unityLibrary
- Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. ==============================================================================
- Get more help at https://help.gradle.org/ BUILD FAILED in 1s`
@RaoulRb12 Unfortunately this will likely still be an issue for a bit, we are still working on tracking down the issue.
@streaminspace Thanks for diving into it and providing these logs. One thing that stands out to me is that the files it is failing to find are the ones specific to the Firebase Unity SDK. Normally these are provided in Firebase/m2repository/..., not via maven, and then copied by the Android resolver in EDM4U to the Assets/Plugins/Android folder, which is then included in the Android build. So I guess, in your project, are those files present in your Assets/Plugins/Android folder? I'm wondering if the "Split application binary" setting makes it not look in that directory like it does with the apk build.
@RaoulRb12 @streaminspace
I think both of you are experiencing the same issue mentioned here. https://github.com/googlesamples/unity-jar-resolver/issues/594
Key way to identify this is some message like
Could not find com.xxx.xxx
Searched in the following locations:
Basically, Unity changed the place to specify Maven Repo from mainTemplate.gradle
to settingsTemplate.gradle
from Unity 2022.2+
. And this change in EDM4U should fixed it.
I am working on a release once I sort out all the failed test in EDM4U.
At the meantime, here is my recommendation
- Upgrade to Unity
2022.2.10+
if you are using Unity 2022.2. Unity2022.2.1
to2022.2.9
has bugs that template variable like**DIR_UNITYPROJECT**
does not work insettingsTemplate.gradle
. If you HAVE to use those versions, convert all local custom Maven repo paths to full absolute path like/user/someone/path/to/unity_project\...
orC:\User\someone\path\to\unity_project\...
for what will be described in the next part. - Enable
Custom Settings Gradle Template
, which is added in2022.2.10
and2023.1
. And move all Maven repos added inmainTemplate.gradle
to thatdependencyResolutionManagement
block. You can see this as an example. Would be great if you can keep that// Android Resolver Repos Start
and// Android Resolver Repos End
lines so that newer version of EDM4U can patch this block properly for you.
Let me know if this works for you.
@a-maurice @chkuang-g Thank you for your answers and suggested steps to fix this issue. For now, to continue working I have decided to change the architecture of my project and not use AAB with the enabled setting "Split application binary". This issue is not actually for me anymore.
I hope this issue will be fixed in official SDK releases, and I will use it later.
@RaoulRb12 @streaminspace
I think both of you are experiencing the same issue mentioned here. googlesamples/unity-jar-resolver#594
Key way to identify this is some message like
Could not find com.xxx.xxx Searched in the following locations:
Basically, Unity changed the place to specify Maven Repo from
mainTemplate.gradle
tosettingsTemplate.gradle
from Unity2022.2+
. And this change in EDM4U should fixed it.I am working on a release once I sort out all the failed test in EDM4U.
At the meantime, here is my recommendation
- Upgrade to Unity
2022.2.10+
if you are using Unity 2022.2. Unity2022.2.1
to2022.2.9
has bugs that template variable like**DIR_UNITYPROJECT**
does not work insettingsTemplate.gradle
. If you HAVE to use those versions, convert all local custom Maven repo paths to full absolute path like/user/someone/path/to/unity_project\...
orC:\User\someone\path\to\unity_project\...
for what will be described in the next part.- Enable
Custom Settings Gradle Template
, which is added in2022.2.10
and2023.1
. And move all Maven repos added inmainTemplate.gradle
to thatdependencyResolutionManagement
block. You can see this as an example. Would be great if you can keep that// Android Resolver Repos Start
and// Android Resolver Repos End
lines so that newer version of EDM4U can patch this block properly for you.Let me know if this works for you.
Thanks it worked.
@RaoulRb12 @streaminspace
I think both of you are experiencing the same issue mentioned here. googlesamples/unity-jar-resolver#594
Key way to identify this is some message like
Could not find com.xxx.xxx Searched in the following locations:
Basically, Unity changed the place to specify Maven Repo from
mainTemplate.gradle
tosettingsTemplate.gradle
from Unity2022.2+
. And this change in EDM4U should fixed it.I am working on a release once I sort out all the failed test in EDM4U.
At the meantime, here is my recommendation
- Upgrade to Unity
2022.2.10+
if you are using Unity 2022.2. Unity2022.2.1
to2022.2.9
has bugs that template variable like**DIR_UNITYPROJECT**
does not work insettingsTemplate.gradle
. If you HAVE to use those versions, convert all local custom Maven repo paths to full absolute path like/user/someone/path/to/unity_project\...
orC:\User\someone\path\to\unity_project\...
for what will be described in the next part.- Enable
Custom Settings Gradle Template
, which is added in2022.2.10
and2023.1
. And move all Maven repos added inmainTemplate.gradle
to thatdependencyResolutionManagement
block. You can see this as an example. Would be great if you can keep that// Android Resolver Repos Start
and// Android Resolver Repos End
lines so that newer version of EDM4U can patch this block properly for you.Let me know if this works for you.
Hello! I have same issue, i think your answer will fix it but, can you explain your answer with more details? I am not a good unity user. Thank you!
Same story, cant build *.aab with a "Build App Bundle (Google Play)" and "Split Application Binary" enabled at the same time. I can fix it by Exporting project to Android Studio and deleting one string in the dependencies block from "AndroidStudio_project_folder\unityLibrary\build.gradle" file. I delete this string “com.google.android.play:asset-delivery:2.0.0”. After that *.aab builds without errors.
Issue Tracker Link: (please vote for faster resolving) https://issuetracker.unity3d.com/product/unity/issues/guid/UUM-49559
I found more simple way without Android Studio: 1 - enable Custom Main Gradle Template 2 - add packagingOptions block into Assets\Plugins\Android\mainTemplate.gradle:
android {
...
packagingOptions {
exclude ('com.google.android.play:asset-delivery:2.0.0')
}
...
}
3 - after that *.aab builds successfull in Unity
the fix from Unity that works for me (I use only GooglePlayGames and GoogleMobileAds plugins):
1 - clean up all aar and jar files and also their metafiles from Assets/Plugins/Android folder 2 - delete Library/Bee/Android/Prj/IL2CPP/Gradle folder 3 - open project 4 - check that Custom Main Gradle Template, Custom Gradle Settings Template, Custom Gradle Properties Template are turned on in Player settings 5 - run Assets/Eternal Dependency Manager/Android Resolver/Resolve (it should end immediately, there should be no new files in Assets/Plugins/Android appear) 6 - build AAB
the fix from Unity that works for me (I use only GooglePlayGames and GoogleMobileAds plugins):
1 - clean up all aar and jar files and also their metafiles from Assets/Plugins/Android folder 2 - delete Library/Bee/Android/Prj/IL2CPP/Gradle folder 3 - open project 4 - check that Custom Main Gradle Template, Custom Gradle Settings Template, Custom Gradle Properties Template are turned on in Player settings 5 - run Assets/Eternal Dependency Manager/Android Resolver/Resolve (it should end immediately, there should be no new files in Assets/Plugins/Android appear) 6 - build AAB
Thanks A LOT! This works perfect for me!
I am using Unity 2022.3.0f, with Firebase, Appsflyer, Facebook plugins.