I want to use the new Multidex support library to break the method limit for one of my apps.
With Android Lollipop Google introduced a multidex support library that
In your build.gradle add this dependency:
compile 'com.android.support:multidex:1.0.1'
again in your build.gradle file add this line to defaultConfig block:
multiDexEnabled true
Instead of extending your application class from Application extend it from MultiDexApplication ; like :
public class AppConfig extends MultiDexApplication {
now you're good to go! And in case you need it, all MultiDexApplication
does is
public class MultiDexApplication extends Application {
@Override
protected void attachBaseContext(Context base) {
super.attachBaseContext(base);
MultiDex.install(this);
}
}