Most visited

Recently visited

MultiDex

public final class MultiDex
extends Object

java.lang.Object
   ↳ android.support.multidex.MultiDex


Monkey patches the application context class loader in order to load classes from more than one dex file. The primary classes.dex must contain the classes necessary for calling this class methods. Secondary dex files named classes2.dex, classes3.dex... found in the application apk will be added to the classloader after first call to install(Context).

This library provides compatibility for platforms with API level 4 through 20. This library does nothing on newer versions of the platform which provide built-in support for secondary dex files.

Summary

Public methods

static void install(Context context)

Patches the application context class loader by appending extra dex files loaded from the application apk.

Inherited methods

From class java.lang.Object

Public methods

install

void install (Context context)

Patches the application context class loader by appending extra dex files loaded from the application apk. This method should be called in the attachBaseContext of your Application, see MultiDexApplication for more explanation and an example.

Parameters
context Context: application context.
Throws
RuntimeException if an error occurred preventing the classloader extension.

Hooray!