title: NoClassDefFoundError when using .aar file
body: <p>I have a .aar file which I added to the libs folder and inside gradle I have</p>
  
  <pre><code>compile(name:'file-name', ext:'aar')
  </code></pre>
  
  <p>It compiles fine, but when I run it I get:</p>
  
  <pre><code>System.err: java.lang.NoClassDefFoundError: com.app.foo.MUtil$3
  </code></pre>
  
  <p>Now this <strong>MUtil class</strong> is used inside the API method of the <strong>.aar library</strong> I use inside my app. I could see the MUtil class in the exploded-aar folder and I can even go to that class by <kbd>ctrl+click </kbd> on its usage. But still  <strong><code>NoClassDefFoundError</code></strong>. Why?</p>
  
  <p><strong>Gradle file</strong></p>
  
  <pre><code>apply plugin: 'com.android.application'
  apply plugin: 'maven'
  apply plugin: 'com.neenbedankt.android-apt'
  
  repositories {
      mavenCentral()
      maven { url 'https://clojars.org/repo/' }
      maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
  
      flatDir {
          dirs 'libs'
      }
  }
  
  android {
      compileSdkVersion 23
      buildToolsVersion "22.0.1"
  
      defaultConfig {
          applicationId "com.xxx.xxx"
          minSdkVersion 16
          targetSdkVersion 23
          versionCode 1
          versionName "1.0"
      }
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
          }
      }
      packagingOptions {
          exclude 'META-INF/services/javax.annotation.processing.Processor'
      }
      productFlavors {
      }
  
      lintOptions {
          abortOnError false
      }
  }
  
  buildscript {
      repositories {
          mavenCentral()
      }
  
      dependencies {
          classpath 'com.neenbedankt.gradle.plugins:android-apt:1.4'
          classpath 'com.android.tools.build:gradle:1.2.3'
      }
  }
  
  
  dependencies {
      compile fileTree(dir: 'libs', include: ['*.jar'])
      compile 'com.android.support:cardview-v7:23.0.+'
      compile 'com.android.support:recyclerview-v7:23.0.+'
      compile 'com.android.support:appcompat-v7:23.1.1'
      compile('xx.xxx.xxxx:xx-xxx:0.1.2@aar') {
          transitive = true
      }
  }
  
  task wrapper(type: org.gradle.api.tasks.wrapper.Wrapper) {
      gradleVersion = '2.5'
  }
  </code></pre>