title: Jenkins job using Gradle can't find executable
body: <p>I am trying to set up a Jenkins job to build the next big Android app! I've got the Android SDK installed and that part seems to be working fine. I've got Gradle Plugin v1.24 installed on Jenkins and now I think I'm trying to figure out how to get Gradle actually working.</p>
  
  <p>First attempt was to have Jenkins download a specific version automatically from gradle.org. I'm trying to pull v2.2.1 because that seems to be the version my Android app builds with locally. When I do that I get this error in my Jenkins job:</p>
  
  <pre><code>[Gradle] - Launching build.
  Invalid tool ID 2.2.1
  [Gradle] - [ERROR] Can't retrieve the Gradle executable.
  Build step 'Invoke Gradle script' marked build as failure
  </code></pre>
  
  <p>I tried many different versions but could not get that working. So, next was to tell Jenkins where to download Gradle from. I gave it this location:</p>
  
  <pre><code>https://services.gradle.org/distributions/gradle-2.2.1-bin.zip
  </code></pre>
  
  <p>I get a different error when building but still not too sure what to do.</p>
  
  <pre><code>[Gradle] - Launching build.
  [Journeyman-Android] $ gradle clean build
  FATAL: command execution failed
  java.io.IOException: Cannot run program "gradle" (in directory "/var/lib/jenkins/workspace/Journeyman-Android"): error=2, No such file or directory
  at java.lang.ProcessBuilder.start(ProcessBuilder.java:1047)
  at hudson.Proc$LocalProc.&lt;init&gt;(Proc.java:244)
  at hudson.Proc$LocalProc.&lt;init&gt;(Proc.java:216)
  at hudson.Launcher$LocalLauncher.launch(Launcher.java:816)
  at hudson.Launcher$ProcStarter.start(Launcher.java:382)
  at hudson.Launcher$ProcStarter.join(Launcher.java:389)
  at hudson.plugins.gradle.Gradle.performTask(Gradle.java:262)
  at hudson.plugins.gradle.Gradle.perform(Gradle.java:116)
  at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
  at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779)
  at hudson.model.Build$BuildExecution.build(Build.java:205)
  at hudson.model.Build$BuildExecution.doRun(Build.java:162)
  at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:537)
  at hudson.model.Run.execute(Run.java:1744)
  at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
  at hudson.model.ResourceController.execute(ResourceController.java:98)
  at hudson.model.Executor.run(Executor.java:374)
  Caused by: java.io.IOException: error=2, No such file or directory
  at java.lang.UNIXProcess.forkAndExec(Native Method)
  at java.lang.UNIXProcess.&lt;init&gt;(UNIXProcess.java:186)
  at java.lang.ProcessImpl.start(ProcessImpl.java:130)
  at java.lang.ProcessBuilder.start(ProcessBuilder.java:1028)
  ... 16 more
  Build step 'Invoke Gradle script' changed build result to FAILURE
  </code></pre>
  
  <p>I tried to see what I can do with the Jenkins CLI but that fails for me too. We use Jenkins to build/deploy several other projects successfully so this is a working Jenkins installation.</p>
  
  <p>Does anyone have any pointers or suggestions for what I may need to do?</p>
  
  <p><strong>Update (still failing)</strong></p>
  
  <p>I am able to build my app manually but navigating to the root of my project in the jenkins workspace and executing</p>
  
  <pre><code>./gradlew assemble
  </code></pre>