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
- Animator Controller throws MissingReferenceException after undoing Layer Creation
- Full stack trace is always printed when an exception occurs in an IL2CPP build
- Licensing Client fails to launch when opening Unity Hub (licensing client path is not found)
- Licensing Client fails to launch when opening Unity Hub
- Different custom Shader behavior when GPU Resident Drawer is enabled
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.