zoukankan      html  css  js  c++  java
  • ClassLoader家族

    DexClassLoader可以加载外部的dex,而PathClassLoader只能加载内部的dex

    双亲委托

    ClassLoader(ClassLoader parentLoader,boolean nullAllowed){
           if(parentLoader == null && !nullAllowed){
                   throw new NullPointerException("parentLoader == null && !nullAllowed");
           }  
           parent = parentLoader;
    }   

    双亲委托的意义是为了性能,每次加载都会消耗时间,但如果父亲加载过,就可以直接拿来使用了

    1.混淆会将app中用不到的方法全部删除

    2.android 5.0修复了方法数65536的爆棚问题

    3.classes.dex为主dex,使用PathClassLoader进行加载,而classes2.dex和classes3.dex这些子dex,在app启动后会使用DexClassLoader进行加载

  • 相关阅读:
    最佳路径搜索算法1
    积分方程的程序化解决方案
    lcov
    nvidia driver
    dependency
    scp ssh-server
    boost 安装 latest
    ubuntu 快捷键
    nvidia drive
    查询优化器 postgres
  • 原文地址:https://www.cnblogs.com/anni-qianqian/p/10085135.html
Copyright © 2011-2022 走看看