Android classloader for optimized dex (odex) files

I am attempting to find a class loader that works for optimized dex files (odex files). I looked through all the android documentation and found the following class loaders.

  • DexClassLoader https://developer.android.com/reference/dalvik/system/DexClassLoader.html

  • PathClassLoader https://developer.android.com/reference/dalvik/system/PathClassLoader.html

  • UrlClassLoader https://developer.android.com/reference/java/net/URLClassLoader.html

  • They all seem to work for either APKs or JAR files (or APKs that contain classes.dex files), but none seem to work for odex files :(

    I have an optimized dex file that I would like to load into my app but I am struggling to find a way to load the file. Is there a way to do this?

    Thanks!

    链接地址: http://www.djcxy.com/p/62556.html

    上一篇: 如何使用DexClassLoader在aar文件中动态加载类

    下一篇: 用于优化dex(odex)文件的Android类加载器