- Home /
CommandInvokationFailure: Gradle build failed when build android apk
Hei, anyone can help me because i'm a newbie on unity especially on building android app with unity. I have done with my code and i want to produce it into .apk file but i get some errors, like this :
And i have surfing for a day and do some of unity forums comment to fixed this error but it doesn't work at all. Please help me :(
I use Unity 2017.4.25f1 64bit (LTS Version) and Jdk 8u161 with SDK Manager version on android 29.0.0
CommandInvokationFailure: Gradle build failed. C:/ProgramFiles/Java/jdk1.8.0_161\bin\java.exe -classpath "C:\Program Files\Unity\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-4.6.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "assembleRelease"
stderr[ FAILURE: Build failed with an exception.
What went wrong: A problem occurred configuring root project 'gradleOut'.
Failed to find Build Tools revision 29.0.0
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 3s ] stdout[
] exit code: 1 UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) UnityEditor.Android.AndroidJavaTools.RunJava (System.String args, System.String workingdir, System.Action`1 progress, System.String error) UnityEditor.Android.GradleWrapper.Run (System.String workingdir, System.String task, System.Action`1 progress) Rethrow as GradleInvokationException: Gradle build failed UnityEditor.Android.GradleWrapper.Run (System.String workingdir, System.String task, System.Action`1 progress) UnityEditor.Android.PostProcessor.Tasks.BuildGradleProject.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
Your answer
Follow this Question
Related Questions
Unable to list target platforms. When I try to build to Andriod on Mac 5 Answers
Android SDK not found or invalid unity. 3 Answers
Unity freezing when trying to build to android? 0 Answers
Android SDK not found or invalid in unity. 3 Answers
Has anyone gotten Unity2020 working with external Android libs/tools? 0 Answers