title: Gradle compile error "No Signature of Method"
body: <p>When I try to run ./gradlew build.gradle from terminal, I have been getting following error:</p>
  
  <pre><code>&gt; No signature of method: org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.compile() is applicable for argument types: (org.gradle.api.internal.project.DefaultProject_Decorated) values: [project ':TestMobile']
  Possible solutions: module(java.lang.Object)
  </code></pre>
  
  <p>I have tried applying java plugin at root build.gradle file and also on sub projects. but still I get same error.</p>
  
  <p>I have the following project structure:</p>
  
  <pre><code>ProjectRepos
  -&gt;build.gradle
  -&gt;settings.gradle
  -&gt;TestMobile (Android plugin)
     -&gt;build.gradle
  -&gt;ThirdParty/SlidingMenu (Android library)
    -&gt;build.gradle
  </code></pre>
  
  <p>Where top level build.gradle contains:</p>
  
  <pre><code>// Top-level build file where you can add configuration options common to all sub-   projects/modules.
  buildscript {
      repositories {
      mavenCentral()
  }
  dependencies {
      classpath 'com.android.tools.build:gradle:0.5.+'
      compile project(':TestMobile')
      compile project(':ThirdParty:SlidingMenu')      
  }
  }
  </code></pre>
  
  <p>settings.gradle contains following:</p>
  
  <pre><code>include ':ThirdParty:SlidingMenu'
  include ':TestMobile'
  </code></pre>
  
  <p>TestMobile -> build.gradle contains following:</p>
  
  <pre><code>apply plugin: 'android'
  
  dependencies {
      compile fileTree(dir: 'libs', include: '*.jar')
      compile project(':ThirdParty:SlidingMenu')
  }
  
  android {
  compileSdkVersion 18
  buildToolsVersion "18.0.1"
  
  sourceSets {
      main {
          manifest.srcFile 'AndroidManifest.xml'
          java.srcDirs = ['src']
          resources.srcDirs = ['src']
          aidl.srcDirs = ['src']
          renderscript.srcDirs = ['src']
          res.srcDirs = ['res']
          assets.srcDirs = ['assets']
      }
  
      // Move the tests to tests/java, tests/res, etc...
      instrumentTest.setRoot('tests')
  
      debug.setRoot('build-types/debug')
      release.setRoot('build-types/release')
   }
  }
  </code></pre>
  
  <p>ThirdParty/SlidingMenu -> build.gradle contains following:</p>
  
  <pre><code>apply plugin: 'android-library'
  dependencies {
  compile fileTree(dir: 'libs', include: '*.jar')
  }
  
  android {
  compileSdkVersion 18
  buildToolsVersion "18.0.1"
  
  sourceSets {
      main {
          ......
          ......
  
     }
   }
  </code></pre>