title: Why does Android Studio don't recognize .jar library imports?
body: <p>I'm trying to use some .jar files as libraries in my Android Studio project.</p>
  
  <p>I've been looking on how to do it, and the regular way is to copy the .jar file in the libs folder, and then add it as library. I know the libs folder must be inside "app" module in the "project" view. But that option to add as library doesn't appear. So my approach is to add it manually doing right click on "app" and:</p>
  
  <p>Open Module Setings/app/Dependencies/ and there add .jar files as <strong>file dependency.</strong></p>
  
  <p>Then, I go to my .class but the import suggestions don't let me select these libraries as import.</p>
  
  <p>I have tried another approach from the "android" view. Doing right click on "app" and selecting "new module", there I select <strong>Import .JAR or .AAR Package</strong> and then I do the same as before from Open Module Setings, but this time I add it as <strong>Module Dependency.</strong></p>
  
  <p>In booth ways, the gradle.build file is updated adding these dependencies, but when going to the activity to select the import, it doesn't give me the chance to select the import from these ones.</p>
  
  <p>I have spent a full day trying to solve this, but I don't get my activity to recognize the imports from these files, so I would appreciate if someone could tell me what I'm doing wrong or what I'm missing to do.</p>
  
  <p>Top-level build.gradle file:</p>
  
  <pre><code>buildscript {
      repositories {
          jcenter()
      }
      dependencies {
           classpath 'com.android.tools.build:gradle:1.1.3'
  
          // NOTE: Do not place your application dependencies here; they belong
          // in the individual module build.gradle files
      }
  }
  
  allprojects {
      repositories {
          jcenter()
      }
  }
  </code></pre>
  
  <p>app-level build.gradle file:</p>
  
  <pre><code>apply plugin: 'com.android.application'
  
  android {
      compileSdkVersion 21
      buildToolsVersion "21.1.2"
  
      defaultConfig {
          applicationId "com.myapp"
          minSdkVersion 14
          targetSdkVersion 21
          versionCode 1
          versionName "1.0"
      }
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
          }
      }
      sourceSets { main { res.srcDirs = ['src/main/res', 'src/main/res/values-v14'] } }
  
      packagingOptions {
          exclude 'META-INF/LICENSE.txt'
      }
  }
  
  dependencies {
      compile fileTree(dir: 'libs', include: ['*.jar'])
      compile 'com.android.support:appcompat-v7:21.0.3'
      compile project(':activation')
      compile project(':mail')
  }
  </code></pre>