create

Create a bridge from a standalone DEX file or an archive containing DEX files.

----------------

从独立 DEX 文件或包含 DEX 的归档文件创建 DexKitBridge。

Return

DexKitBridge

Parameters

apkPath

path to a DEX, APK, JAR or ZIP file / DEX、APK、JAR 或 ZIP 文件路径

See also


create DexKitBridge by dex bytes array

----------------

通过 dex 字节数组创建 DexKitBridge

Return

DexKitBridge

Parameters

dexBytesArray

dex bytes array / dex 字节数组


fun create(loader: ClassLoader, useMemoryDexFile: Boolean): DexKitBridge

create DexKitBridge by class loader, if useMemoryDexFile is true, will try to use cookie to load memory dex file. if there are OatDex that cannot be parsed, it will fall back to use to load dex file.

通过类加载器创建 DexKitBridge,如果 useMemoryDexFile 为 true,将尝试使用 cookie 加载内存 dex 文件,如果存在不能解析的 OatDex 则会回退使用 apkPath 加载 dex 文件。

Parameters

loader

class loader / 类加载器

useMemoryDexFile

whether to use memory dex file / 是否使用内存 dex 文件