public class DexClassLoader extends BaseDexClassLoader
.jar and .apk files
containing a classes.dex entry. This can be used to execute code not
installed as part of an application.
This class loader requires an application-private, writable directory to
cache optimized classes. Use Context.getCodeCacheDir() to create
such a directory:
File dexOutputDir = context.getCodeCacheDir();
Do not cache optimized classes on external storage. External storage does not provide access controls necessary to protect your application from code injection attacks.
proxyCache| Constructor and Description |
|---|
DexClassLoader(String dexPath,
String optimizedDirectory,
String libraryPath,
ClassLoader parent)
Creates a
DexClassLoader that finds interpreted and native
code. |
findClass, findLibrary, findResource, findResources, getLdLibraryPath, getPackage, toStringclearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLoadedClass, findSystemClass, getPackages, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, loadClass, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSignerspublic DexClassLoader(String dexPath, String optimizedDirectory, String libraryPath, ClassLoader parent)
DexClassLoader that finds interpreted and native
code. Interpreted classes are found in a set of DEX files contained
in Jar or APK files.
The path lists are separated using the character specified by the
path.separator system property, which defaults to :.
dexPath - the list of jar/apk files containing classes and
resources, delimited by File.pathSeparator, which
defaults to ":" on AndroidoptimizedDirectory - directory where optimized dex files
should be written; must not be nulllibraryPath - the list of directories containing native
libraries, delimited by File.pathSeparator; may be
nullparent - the parent class loader