title: Android NoClassDefFoundError for library's class inside a dependency
body: <p>I created an Android library named "core" that use the Logger library (<a href="https://github.com/orhanobut/logger" rel="noreferrer">https://github.com/orhanobut/logger</a>).</p>
  
  <p>Here its <code>build.gradle</code>:</p>
  
  <pre><code>apply plugin: 'com.android.library'
  
  android {
      compileSdkVersion 25
      buildToolsVersion "25.0.1"
  
      defaultConfig {
          minSdkVersion 16
          targetSdkVersion 25
          versionCode 1
          versionName "1.0"
  
          testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
  
      }
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
          }
      }
  }
  
  dependencies {
      compile fileTree(dir: 'libs', include: ['*.jar'])
  
      compile 'com.orhanobut:logger:1.15'
  
      compile 'com.android.support:appcompat-v7:25.0.1'
  
      testCompile 'junit:junit:4.12'
  }
  </code></pre>
  
  <p>Then I build a <code>.aar</code> of core library.</p>
  
  <p>I add this library as a dependency into my application, by putting the <code>.aar</code>core files in the <code>libs</code> folder.</p>
  
  <p>That's the <code>build.gradle</code> of my application :</p>
  
  <pre><code>apply plugin: 'com.android.application'
  
  android {
      compileSdkVersion 25
      buildToolsVersion "25.0.1"
      defaultConfig {
          applicationId "com.package.test"
          minSdkVersion 16
          targetSdkVersion 25
          multiDexEnabled true
          versionCode 1
          versionName "1.0"
          testInstrumentationRunner     "android.support.test.runner.AndroidJUnitRunner"
  
      }
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
          }
      }
  }
  
      repositories {
      mavenCentral()
      jcenter()
      flatDir {
          dirs 'libs'
      }
  }
  
  dependencies {
  
      compile 'com.mypackage:core:1.0@aar'
  
      compile fileTree(dir: 'libs', include: ['*.jar'])
      androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
          exclude group: 'com.android.support', module: 'support-annotations'
      })
  
      testCompile 'junit:junit:4.12'
  
      compile 'com.android.support:appcompat-v7:25.0.1'
      compile 'com.android.support:multidex:1.0.1'
  
  }
  </code></pre>
  
  <p>As you can see I have <code>multidex</code> activated.</p>
  
  <p>It compile just fine but at runtime, at the first call to <code>Logger</code> I get an exception:</p>
  
  <p><code>stack=java.lang.NoClassDefFoundError: Failed resolution of: Lcom/orhanobut/logger/Logger;</code></p>
  
  <p>Even if I set <code>transitive = true</code></p>
  
  <pre><code>compile (com.mypackage:core:1.0@aar) {
          transitive=true
  }
  </code></pre>
  
  <p>it doesn't work.</p>
  
  <p>Thank you !</p>