title: Android Studio - java.lang.RuntimeException: Unable to instantiate application
body: <p>I am working on a project in eclipse, but after sometime it giving me error like <code>"Unable to execute dex: method ID not in" as single DEX file having 65k method limitations.</code></p>
  
  <p>To overcome the issue I come into the picture of <code>Gradle plugin v0.14.0 for Android adds support for Multi-Dex.</code> So I moved to <strong>Android Studio.</strong></p>
  
  <p>I have updated SDK and exported project from eclipse as per <a href="https://developer.android.com/sdk/installing/migrate.html" rel="nofollow">Migrating from Eclipse.</a></p>
  
  <p>Now I have project structure required in Android Studio.Their is dependency of project on ABS, Google Play Service lib and android multidex support lib. I have added these libraries to my project folder named "libraries".</p>
  
  <p>Project Gradle file looks something below:</p>
  
  <pre><code>buildscript {
  repositories {
      mavenCentral()
  }
  dependencies {
      classpath 'com.android.tools.build:gradle:0.14.1'
  }
  }
  
  apply plugin: 'com.android.application'
  
  dependencies {
  compile fileTree(dir: 'libs', include: '*.jar')
  compile project(':libraries:ABS')
  compile project(':libraries:GooglePlayServiceLib')
  
  
  compile (project(':libraries:android-support-multidex')) {
      exclude group: 'com.android.support', module: 'support-v4'
  }
  
  
    compile "com.android.support:support-v4:21.0.0"
  
  
  }
  
  
  android {
  compileSdkVersion 19
  buildToolsVersion "20.0.0"
  
  dexOptions {
      preDexLibraries = false
  
  
     }
  
  
  sourceSets {
      main {
          manifest.srcFile 'AndroidManifest.xml'
          java.srcDirs = ['src']
          resources.srcDirs = ['src']
          aidl.srcDirs = ['src']
          renderscript.srcDirs = ['src']
          res.srcDirs = ['res']
          assets.srcDirs = ['assets']
      }
  
  
      instrumentTest.setRoot('tests')
  
  
      debug.setRoot('build-types/debug')
      release.setRoot('build-types/release')
  
      buildTypes {
          release {
              runProguard true
              proguardFiles getDefaultProguardFile('proguard-android.txt'),
                      'proguard-rules.pro'
          }
      }
  
  }
  
  
  }
  
  afterEvaluate {
  tasks.matching {
      it.name.startsWith('dex')
  }.each { dx -&gt;
      if (dx.additionalParameters == null) {
          dx.additionalParameters = ['--multi-dex']
      } else {
          dx.additionalParameters += '--multi-dex'
      }
  }
  }
  </code></pre>
  
  <p>When I clean and build project it builds successfully. But when I run project as android application giving me following error:</p>
  
  <pre><code>java.lang.RuntimeException: Unable to instantiate application java.lang.ClassNotFoundException: Didn't find class on path: DexPathList[[zip file "/system/framework/android.test.runner.jar", zip file "/data/app/com.example-2.apk"],nativeLibraryDirectories=[/data/app-lib/com.example-2, /vendor/lib, /system/lib]]
  </code></pre>
  
  <p>I am thinking that application is not compiling AndroidManifest.xml OR I am something missing ?
  Any help is going to be appreciated. :)</p>