I was attempting to update my project to targetSdk 23, but I decided I wasn\'t up for it given all the deprecations. I didn\'t want to go through it so I reverted to an olde
Android application (APK) files contain executable bytecode files in the form of Dalvik Executable (DEX) files, which contain the compiled code used to run your app. The Dalvik Executable specification limits the total number of methods that can be referenced within a single DEX file to 65,536, including Android framework methods, library methods, and methods in your own code. Getting past this limit requires that you configure your app build process to generate more than one DEX file, known as a multidex configuration.
Modify your app Gradle build file configuration to include the support library and enable multidex output .
android {
compileSdkVersion 21
buildToolsVersion "21.1.2"
defaultConfig {
...
minSdkVersion 14
targetSdkVersion 21
...
// Enabling multidex support.
multiDexEnabled true
}
...
}
dependencies {
compile 'com.android.support:multidex:1.0.0'
}
For more details you can visit
DexIndexOverflowException Only When Running Tests