In my proyect I have this dependecies:
compile ('com.twitter.sdk.android:twitter:2.2.0@aar'){
transitive=true;
}
compile 'com.google.android.gms:play-services-maps:11.2.0'
compile 'com.google.android.gms:play-services-auth:11.2.0'
compile 'com.itextpdf:itextg:5.5.10'
compile 'com.nightonke:boommenu:2.1.0'
compile 'com.squareup.retrofit2:retrofit:2.3.0'
compile 'com.squareup.retrofit2:converter-gson:2.3.0'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support:design:25.3.1'
compile 'com.android.support:support-v4:25.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
twitter and google are used to sign up a new user, but if I want to add facebook using com.facebook.android:facebook-android-sdk:[4,5) dependency, appears this error:
Error:Execution failed for task ':app:transformClassesWithDexForDebug'. com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.dex.DexIndexOverflowException: Cannot merge new index 70800 into a non-jumbo instruction!
I also notice that if I delete
compile 'com.itextpdf:itextg:5.5.10'
The error never appears, but I need that dependency!!
I found that this happends while there are too much strings or something like that, and It can be fixed by adding
dexOptions {
jumboMode = true
}
But the compile time increase!!
So, why that happend if facebook is independent of itext?
and how to fix that issue without delete something or adding dexOption or even without adding multidex option?