Search Issue Tracker
Third Party Issue
Votes
3
Found in
2019.4
2019.4.26f1
Issue ID
1339047
Regression
No
Android build fails to do Gradle errors of multiple external SDKs
Steps to reproduce:
1. Open the user's attached project "Line Slice.zip"
2. Build it for Android
Expected results: Android build completes
Actual results: Android build fails due to Gradle problems
Reproducible with: 2019.4.28f1
Unable to test with: 2018.4.35f1, 2020.3.11f1, 2021.1.10f1, 2021.2.0a19 due to packages break beyond repair
The start of the first error:
Temp\gradleOut\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'.
The start of the second error:
CommandInvokationFailure: Gradle build failed.
C:\Unity Version\2019.4\2019.4.25f1_01a0494af254\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-5.1.1.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "bundleRelease"
Notes:
- full error is attached in "error.txt"
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- "Shader warning in 'Hidden/Light2D': implicit truncation of vector type" is thrown when building Universal 2D template
- AI Assistant breaks compilation of packages using System.Runtime.CompilerServices.Unsafe via auto-referencing
- Unity Hub checks the "Documentation" module by default on the 6.4 and 6.5 streams despite that it was unchecked with the previous installs
- Shortcut that toggles between Dopesheet and Curves Views in the Animation Window's Timeline is mislabed
- Property List Items Overlap onto the Property List's top edge when scrolling through a long Property List
Resolution Note (2022.1.X):
Problems are with third party libraries used by the project.
The Gradle errors say:
Duplicate class com.facebook.android.BuildConfig found in modules classes.jar (:facebook-android-wrapper-9.0.0:) and classes.jar (:facebook-android-wrapper-9.1.0:)
and similar, which tell that project uses two different versions of the same library, possible one pulled as dependency. This needs to be sorted out it gradle files of the dependencies and is not something done by Unity.