Added in API level 1

PathClassLoader

open class PathClassLoader : BaseDexClassLoader
kotlin.Any
   ↳ java.lang.ClassLoader
   ↳ dalvik.system.BaseDexClassLoader
   ↳ dalvik.system.PathClassLoader

Provides a simple ClassLoader implementation that operates on a list of files and directories in the local file system, but does not attempt to load classes from the network. Android uses this class for its system class loader and for its application class loader(s).

Summary

Public constructors
PathClassLoader(dexPath: String!, parent: ClassLoader!)

Creates a PathClassLoader that operates on a given list of files and directories.

PathClassLoader(dexPath: String!, librarySearchPath: String!, parent: ClassLoader!)

Creates a PathClassLoader that operates on two given lists of files and directories.

Inherited functions

Public constructors

PathClassLoader

Added in API level 1
PathClassLoader(
    dexPath: String!,
    parent: ClassLoader!)

Creates a PathClassLoader that operates on a given list of files and directories. This method is equivalent to calling PathClassLoader(java.lang.String,java.lang.String,java.lang.ClassLoader) with a null value for the second argument (see description there).

Parameters
dexPath String!: the list of jar/apk files containing classes and resources, delimited by File.pathSeparator, which defaults to ":" on Android
parent ClassLoader!: the parent class loader

PathClassLoader

Added in API level 1
PathClassLoader(
    dexPath: String!,
    librarySearchPath: String!,
    parent: ClassLoader!)

Creates a PathClassLoader that operates on two given lists of files and directories. The entries of the first list should be one of the following:

  • JAR/ZIP/APK files, possibly containing a "classes.dex" file as well as arbitrary resources.
  • Raw ".dex" files (not inside a zip file).
The entries of the second list should be directories containing native library files.

Parameters
dexPath String!: the list of jar/apk files containing classes and resources, delimited by File.pathSeparator, which defaults to ":" on Android
librarySearchPath String!: the list of directories containing native libraries, delimited by File.pathSeparator; may be null
parent ClassLoader!: the parent class loader