Search Issue Tracker
Won't Fix
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
- The first frames are skipped when playing a video
- Text auto-scrolling can not work when naming assets/objects until backspace key is pressed
- Shadows are not cast when the Light's CullingMask and the GameObject's Layer do not match
- Graphics.DrawMeshInstanced does not work when 2D Renderer and 2D Shaders are used
- SpeedTree does not move when using WindZone
Resolution Note:
Looks like the error message tells what wrong and how to fix it.
Issue with external tools.