Android Multidex and the Dex Method Limit suggest change

Multidex by extending MultiDexApplication

This is very similar to using an Application subclass and overriding the attachBaseContext() method.

However, using this method, you don’t need to override attachBaseContext() as this is already done in the MultiDexApplication superclass.

Extend MultiDexApplication instead of Application:

package com.example;

import android.content.Context;

 * Extended MultiDexApplication 
public class MyApplication extends MultiDexApplication {

     // No need to override attachBaseContext()


Add this class to your AndroidManifest.xml exactly as if you were extending Application:


Feedback about page:

Optional: your email if you want me to get back to you:

Table Of Contents