Copyright © 2026 Unity Technologies
Looks like the error message tells what wrong and how to fix it. Issue with external tools.
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.
Using Android SDK: /Applications/Unity/Hub/Editor/2023.1.4f1/PlaybackEngines/AndroidPlayer/SDK
Issues you vote on will appear here