PathClassLoader和DexClassLoader

    xiaoxiao2026-05-01  1

    动态加载.apk.jar.dex文件而且路径不受限制

    4.1之后的版本中,不允许直接加载外部jar

    final File dexOutputPath =new File(Environment.getExternalStorageDirectory().toString() + File.separator + "dextest/Demojar-dex.jar"); File dir = this.getDir("out-dex", 0); DexClassLoader cl = new DexClassLoader(dexOutputPath.getAbsolutePath(), dir.getAbsolutePath(), null, getClassLoader());
    转载请注明原文地址: https://ju.6miu.com/read-1309244.html
    最新回复(0)