title: gradle: could not find method apply<>
body: <p>I am trying to create a build script using gradle to build a android project and using plugins from eclipse and android but it doesnt seem to work and failes with the following error when I run <code>gradle eclipse</code>:</p>
  
  <pre><code>* What went wrong:
  A problem occurred evaluating root project 'RssUnified'.
  Cause: Could not find method apply() for arguments [{plugin=eclipse}] on root project 'RssUnified'.
  </code></pre>
  
  <p>Here is my build script:</p>
  
  <pre><code>//apply eclipse plugin
  apply plugin: 'eclipse'
  
  //apply android plugin
  apply plugin: 'android'
  
  task hello &lt;&lt; {
      String value = 'wagwan'
  
      println 'Hello world!' + value.toUpperCase()
  }
  
  //setup external dependancy plugins we will use to build a android application
  repositories {
      mavenCentral()
  }
  
  dependencies {
      classpath 'org.gradle.api.plugins:gradle-android-plugin:1.2.1'
  }
  </code></pre>
  
  <p>Gradle exception thrown below:</p>
  
  <pre><code>Exception in thread "main" java.lang.NoClassDefFoundError: org/gradle/BootstrapMain
  Caused by: java.lang.ClassNotFoundException: org.gradle.BootstrapMain
          at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
          at java.security.AccessController.doPrivileged(Native Method)
          at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
          at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
          at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
          at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
  Could not find the main class: org.gradle.BootstrapMain.  Program will exit.
  </code></pre>
  
  <p>I downloaded full gradle version from this link: <a href="http://www.gradle.org/downloads" rel="nofollow">http://www.gradle.org/downloads</a> </p>