# PluginDemo **Repository Path**: geguo/PluginDemo ## Basic Information - **Project Name**: PluginDemo - **Description**: 1、加载插件中的类 2、加载插件中的资源 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2018-12-07 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 2018年12月6日 ## 将资源移动到file目录 ## 加载资源 > Resoure 通过 AssertManger 找到指定id对应的文件 1. 构造一个 Resoure 和 AssertManager 可以找到对应 插件 的 res 目录的文件 2. 将 插件路径添加到这个新的 AssertManager 的 assetPath 中 目标:通过资源id 找到插件中的资源 ## 加载类文件 1. 构造一个自定义类加载器去加载插件中的类 BaseDexClassLoader | PathClassLoader(系统默认用这个去加载已安装的类) | DexClassLoader(可以去加载指定路径的jar/dex/apk) 目标:通过 类名 加载插件中的Class对象 ## 代理四大组件