public final class MultiDex extends Object
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.Modifier and Type | Method and Description |
---|---|
static void |
install(Context context)
Patches the application context class loader by appending extra dex files
loaded from the application apk.
|
public static void install(Context context)
Application
, see
MultiDexApplication
for more explanation and an example.context
- application context.RuntimeException
- if an error occurred preventing the classloader
extension.