title: Android-Tools Gradle Plugin
body: <p>I am currently trying to get the new build system for android (<a href="http://tools.android.com/tech-docs/new-build-system/using-the-new-build-system">http://tools.android.com/tech-docs/new-build-system/using-the-new-build-system</a>) to work. Therefore I created a <code>build.gradle</code> file with the following contents:</p>
  
  <pre><code>apply plugin: 'android'
  
  android {
      compileSdkVersion 15
      target='android-15'    
  
      defaultConfig {
          targetSdkVersion 15
          minSdkVersion 8
          versionCode 10
      }
  
      sourceSets {
          main {
              manifest {
                  srcFile 'AndroidManifest.xml'
              }
          }
      }
  }
  
  repositories {
      mavenCentral()
  }
  
  dependencies {
      compile 'com.google.android:android:4.0.1.2'
      compile project(':ActionBarSherlock')
      compile fileTree(dir: './libs', include: '*.jar')
  }
  </code></pre>
  
  <p>I've done this based on the docs, so I expect it to work; however, I get the following error message:</p>
  
  <blockquote>
    <p>ERROR: The default configuration has an indirect dependency on Android
    API level 14, but minSdkVersion for variant 'Debug' is API level 8</p>
  </blockquote>
  
  <p>When removing the explicit dependency on android 4.0.1.2, the error vanishes but I am left with compile errors because Android files themselves cannot be resolved. As an example, <code>Activity</code> or <code>View</code> as classes cannot be found. Supposedly, I could downgrade to an older version of Android to match the <code>minSdkVersion</code>, but I want to compile against sdk <code>15</code> with a minimum of <code>8</code>.</p>
  
  <p>The plugin itself is declared in a root build.gradle with version 0.3.</p>
  
  <p>Has anyone of you got an idea how to resolve that error?</p>
  
  <p>Thanks,
  Matthias</p>