Search Issue Tracker
Won't Fix
Won't Fix in 2023.1.X
Votes
0
Found in
2022.3.10f1
2023.1.13f1
Issue ID
UUM-52883
Regression
No
[Android] A build fails with "CommandInvokationFailure: Gradle build failed."
How to reproduce:
1. Open the attached “IN-53906” project
2. In the “Edit” → “Project Settings” → “Publishing Settings” disable “Custom Keystore”
3. In the “File” → “Build Settings” click “Build”
Expected result: The build is successful
Actual result: The build fails with “CommandInvokationFailure: Gradle build failed.”
Reproducible with: 2021.3.29f1, 2022.3.10f1, 2023.1.13f1
Not reproducible with: 2021.3.30f1
Fixed in: 2021.3.30f1
Could not test with: 2023.2.0b8, 2023.3.0a6 - Build cannot be initialized due to errors with packages
Testing environment: macOS 13.4.1 (Intel)
Part of the error:
CommandInvokationFailure: Gradle build failed.
/Applications/Unity/Hub/Editor/2023.1.4f1/PlaybackEngines/AndroidPlayer/OpenJDK/bin/java -classpath "/Applications/Unity/Hub/Editor/2023.1.4f1/PlaybackEngines/AndroidPlayer/Tools/gradle/lib/gradle-launcher-7.6.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "assembleRelease"
……
FAILURE: Build failed with an exception.
- What went wrong:
A problem occurred configuring project ':unityLibrary'.
> com.android.builder.sdk.LicenceNotAcceptedException: Failed to install the following Android SDK packages as some licences have not been accepted.
patcher;v4 SDK Patch Applier v4
ndk;23.1.7779620 NDK (Side by side) 23.1.7779620
To build this project, accept the SDK license agreements and install the missing components using the Android Studio SDK Manager.
All licenses can be accepted using the sdkmanager command line tool:
sdkmanager.bat --licenses
Or, to transfer the license agreements from one workstation to another, see https://developer.android.com/studio/intro/update.html#download-with-gradle
Using Android SDK: /Applications/Unity/Hub/Editor/2023.1.4f1/PlaybackEngines/AndroidPlayer/SDK
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
- "IndexOutOfRangeException" and "NullReferenceException" are thrown and Element disappears from UI Builder when undoing rename of element in "Open Instance in Context" menu
- Select Scriptable Object window freezes and becomes unresponsive when currently opened UXML Template is selected for binding's Data Source
- [Linux] “ReleaseButton expects buttonId >= 0” error is thrown when importing Assets via drag and drop
- Asset gets unselected and added Subgraphs list item is not undone when performing Undo in Heatmap with Default Values asset Inspector
- Black square “shadow” artifacts visible when using Screen Space Reflections without maximum smoothing
Resolution Note:
Looks like the error message tells what wrong and how to fix it.
Issue with external tools.
Resolution Note (2023.1.X):
Looks like the error message tells what wrong and how to fix it.
Issue with external tools.