Multidex Issue In Android
I dont Know how to solve Multidex issue in Android. My app has lots of SDKs integration, so App is crossing 65k Over Method limit. I went through lots of tutorials and blogs. I got
Solution 1:
This what we have been using in our project. It seem to work just fine. If you have a machine with low memory, you should lover the 2g parameter as it means that multidex can use up to 2GB of memory. This wasn't an issue for us.
defaultConfig{
// All other stuff you have, just add this line
multiDexEnabled true
}
dexOptions {
incremental true
javaMaxHeapSize "2g"
}
dependencies {
'com.android.support:multidex:1.0.1'
}
In your project you should create an Application class and it should extend the MultiDexApplication
import android.support.multidex.MultiDexApplication;
publicclassYourApllicationextendsMultiDexApplication {
@OverridepublicvoidonCreate() {
super.onCreate();
}
}
Post a Comment for "Multidex Issue In Android"