title: Android studio: why are minSdkVersion and targetSdkVersion specified both in AndroidManifest.xml and build.gradle?
body: <p>I just discovered something weird about Android studio: it has some configuration options in the <code>build.gradle</code> file that override what is specified in the <code>AndroidManifest.xml</code> file.</p>
  
  <p>For instance, I had the following lines in <code>build.gradle</code>:</p>
  
  <pre><code>android {
      compileSdkVersion 18
      buildToolsVersion "18.1.1"
  
      defaultConfig {
          minSdkVersion 10
          targetSdkVersion 10
      }
  ...
  }
  </code></pre>
  
  <p>which was overriding the corresponding tag in <code>AndroidManifest.xml</code>:</p>
  
  <pre><code>&lt;uses-sdk
      android:minSdkVersion="8"
      android:targetSdkVersion="8"/&gt;
  </code></pre>
  
  <p>I don't really like to have the same settings spread in two different files, so I am wondering if I can safely remove it either from <code>build.gradle</code> or <code>AndroidManifest.xml</code> and where it makes more sense to keep it.</p>