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
- Search field in UI Builder's Library has no character limit
- Changing the value in UI Builder by dragging increases it by a few thousand points when reaching the borders of the screen
- ARM64 architecture DLL incorrectly copied instead of x64 when building for Windows x64
- Crash on TypeTreeIterator::GetNode when opening a specific folder
- Crash on WriteSerializedAssetsV2 when (re)entering the Play Mode in a specific project when IEnumerator Start() is used
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.