Android Multidex and the Dex Method Limit edit

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.support.multidex.MultiDexApplication;
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:

<application
    android:name="com.example.MyApplication"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name">
</application>

Table Of Contents
39 ACRA
62 Multidex and the Dex Method Limit
64 Menu
112 Loader
119 Xposed
132 Colors
135 Fresco
140 AdMob
147 Button
156 Vk SDK
170 XMPP
176 OpenCV
200 FileIO
203 Moshi
217 Paint
231 AIDL
241 JCodec
243 Okio
255 Looper
  ↑ ↓ to navigate     ↵ to select     Esc to close