Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Mac user (2019.2.9f1) "CommandInvokationFailure: Gradle build failed."

Discussion in 'Editor & General Support' started by brklemz, Oct 14, 2019.

  1. brklemz

    brklemz

    Joined:
    Nov 26, 2015
    Posts:
    14
    I have spent days trying to track this down and nothing helps, the Android Build just fails (iOS builds fine). I'm a MAC user and most of the help is from Windows users so finding some of their fixes is a bit tedious, but I have tried them all.

    I use the Android SDK and NDK installed with unity and I even updated Java (not needed) because another user somewhere recommended that. I am not using Unity Ads (another past problem I read somewhere). I have reinstalled everything twice, tweaked the "Other Settings" more that that, and bounced around "Preferences/External Tools" more than a few times, following advice from others using earlier versions of Unity.

    Here's where it crashes at:

    CommandInvokationFailure: Gradle build failed.
    /Applications/Unity/2019.2.9f1/PlaybackEngines/AndroidPlayer/Tools/OpenJDK/MacOS/bin/java -classpath "/Applications/Unity/2019.2.9f1/PlaybackEngines/AndroidPlayer/Tools/gradle/lib/gradle-launcher-5.1.1.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "assembleRelease"


    Any help from anyone would be great.
     
  2. Yozaro

    Yozaro

    Joined:
    Jun 28, 2015
    Posts:
    70
    The log should have more than that. Often gradle outputs "what went wrong" or "stderr", try to look for those.
     
  3. Domas_L

    Domas_L

    Unity Technologies

    Joined:
    Nov 27, 2018
    Posts:
    111
unityunity