title: Application Apk built with Android Studio is larger than one built with Eclipse
body: <p>Recently I migrated my project to <strong>Android Studio</strong>. The project references a <strong>library project</strong> without copying it (See <a href="https://stackoverflow.com/a/24539657/1726308">this answer</a>). </p>
  
  <p>I noticed that the apk generated from Android Studio is larger than the one generated from Eclipse (<strong>almost twice larger</strong>). When I unrar the two apk files I see that in the apk from Android Studio there is one more folder "main" and it contains "res" folder and AndroidManifest.xml. </p>
  
  <p>The problem is that there is "res" folder (/res) in apk's main directory which contains the same resources (/main/res).</p>
  
  <p>I think that the next gradle file causes the problem but without it the project can not be built.</p>
  
  <p><strong>build.gradle</strong> for my library module - my_android_project_lib module</p>
  
  <pre><code>buildscript {
      repositories {
          jcenter()
      }
      dependencies {
          classpath 'com.android.tools.build:gradle:1.0.0'
      }
  }
  allprojects {
      repositories {
          jcenter()
      }
  }
  
  apply plugin: 'com.android.library'
  
  android {
      compileSdkVersion 21
      buildToolsVersion "21.1.2"
  
      defaultConfig {
          minSdkVersion 15
          targetSdkVersion 21
      }
  
      // I think this duplicates the resources
      sourceSets {
          main {
              manifest.srcFile 'my_android_project_lib/src/main/AndroidManifest.xml'
              java.srcDirs = ['my_android_project_lib/src']
              resources.srcDirs = ['my_android_project_lib/src']
              aidl.srcDirs = ['my_android_project_lib/src']
              renderscript.srcDirs = ['my_android_project_lib/src']
              res.srcDirs = ['my_android_project_lib/src/main/res', 'slidingMenuLib/src/main/res']
              assets.srcDirs = ['my_android_project_lib/src/main/assets']
          }
      }
  }
  
  dependencies {
      compile project(':slidingMenuLib')
      compile fileTree(dir: 'my_android_project_lib/libs', include: ['*.jar'])
      compile fileTree(dir: 'slidingMenuLib/libs', include: ['*.jar'])
      compile 'com.google.code.gson:gson:1.7.1'
  }
  </code></pre>
  
  <p><strong>settings.gradle</strong></p>
  
  <pre><code>include ':my_android_app'
  include ':my_android_project_lib'
  include ':slidingMenuLib'
  project(':my_android_project_lib').projectDir = new File(settingsDir, '../my_android_project_lib')
  </code></pre>
  
  <p><strong>build.gradle</strong> for my_android_app module</p>
  
  <pre><code>apply plugin: 'com.android.application'
  
  android {
      compileSdkVersion 19
      buildToolsVersion "21.1.2"
  
      defaultConfig {
          applicationId "my.android.app"
          minSdkVersion 15
          targetSdkVersion 19
      }
  
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
          }
      }
  }
  
  dependencies {
      compile project(path: ':my_android_project_lib')
  }
  </code></pre>
  
  <p><strong>build.gradle</strong> for my_android_app project</p>
  
  <pre><code>buildscript {
      repositories {
          jcenter()
      }
      dependencies {
          classpath 'com.android.tools.build:gradle:1.0.0'
      }
  }
  
  allprojects {
      repositories {
          jcenter()
      }
  }
  </code></pre>
  
  <p><strong>Do you know how to fix the problem?</strong> I'm missing something important.</p>