I face on compile error "com.android.dex.DexIndexOverflowException: method ID not in [0, 0xffff]: 65536", I search in google the problem is my project reached a limit of method. I following from MultIDex instruction. I added build.gradle, the following is file context of build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 15
buildToolsVersion "21.1.2"
defaultConfig {
minSdkVersion 15 //lower than 14 doesn't support multidex
targetSdkVersion 21
// Enabling multidex support.
multiDexEnabled = true
}
dexOptions {
preDexLibraries = false
}
}
dependencies {
compile 'com.android.support:multidex:1.0.1'
}
When I build it again, the error still exist, how can I do?
You will need also to create a custom application and override the attachBaseContext method as follow:
then add it on your manifest as follow:
and voila!