Android Multidex and the Dex Method Limit edit

Multidex by extending Application

Use this option if your project requires an Application subclass.

Specify this Application subclass using the android:name property in the manifest file inside the application tag.

In the Application subclass, add the attachBaseContext() method override, and in that method call MultiDex.install():

package com.example;

import android.app.Application;
import android.content.Context;

/**
 * Extended application that support multidex 
 */
public class MyApplication extends Application {

    @Override
    protected void attachBaseContext(Context base) {
        super.attachBaseContext(base);
        MultiDex.install(this);
    }
}

Ensure that the Application subclass is specified in the application tag of your AndroidManifest.xml:

<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