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
- Articulation Body with 'Revolute' Joint Type has erratic behavior when Upper Limit is set to above 360
- WebGL Player fails to render Scene when Terrain with Detail Mesh is added and WebGPU Graphics API is used
- Inconsistent errors are logged when different types are passed into the Query "Q<>" method in UIToolkit and the ancestor VisualElement is null
- Crash on GetMaterialPropertyByIndex when opening a specific Scene
- Discrepancies in the styling are present when using a TSS file instead of a USS file in custom EditorWindow
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.