CommandInvokationFailure Gradle build failed.

Hello everybody,

I am trying to buil my unity game in gradle mode : but i have this error message :

CommandInvokationFailure: Gradle build failed.
C:\Program Files\Java\jdk1.8.0_181\bin\java.exe -classpath “C:\Program Files\Unity\Hub\Editor\2018.2.3f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-4.2.1.jar” org.gradle.launcher.GradleMain “-Dorg.gradle.jvmargs=-Xmx2048m” “assembleRelease”
stderr[
FAILURE: Build failed with an exception.

  • What went wrong:
    A problem occurred configuring root project ‘gradleOut’.

Could not resolve all files for configuration ‘:classpath’.
Could not find manifest-merger.jar (com.android.tools.build:manifest-merger:26.0.1).
Searched in the following locations:
https://jcenter.bintray.com/com/android/tools/build/manifest-merger/26.0.1/manifest-merger-26.0.1.jar
Could not find ddmlib.jar (com.android.tools.ddms:ddmlib:26.0.1).
Searched in the following locations:
https://jcenter.bintray.com/com/android/tools/ddms/ddmlib/26.0.1/ddmlib-26.0.1.jar
Could not find dvlib.jar (com.android.tools:dvlib:26.0.1).
Searched in the following locations:
https://jcenter.bintray.com/com/android/tools/dvlib/26.0.1/dvlib-26.0.1.jar
Could not find common.jar (com.android.tools:common:26.0.1).
Searched in the following locations:
https://jcenter.bintray.com/com/android/tools/common/26.0.1/common-26.0.1.jar

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
  • Get more help at https://help.gradle.org
    BUILD FAILED in 15s
    ]
    stdout[
    Starting a Gradle Daemon, 1 incompatible and 3 stopped Daemons could not be reused, use --status for details
    ]
    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.Action1 progress, System.String error) UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action1 progress)
    Rethrow as GradleInvokationException: Gradle build failed
    UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, 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)

i am using the 2018.2.3.F1 64 bit version,
If you have any idea on how to solve it,

thank you very much

Hi
it’s good now i have solved my problems , by cleaning the .gradle folder in C/User…

1 Like

feel like I tried everything and was like why not just delete the .gradle folder and thank you very much for the reminder to try that cause it worked.