App 功能膨脹導致 APK 體積過大、編譯緩慢、動態更新困難。插件化將功能模組拆分為獨立 APK,主程式按需載入,實現解耦、熱修復、動態分發。
MAIN/LAUNCHER Intent-filter),僅暴露 Service/Activity/ContentProvider 供主程式呼叫。DexClassLoader / PathClassLoader) 載入插件 .dex/.so。AssetManager.addAssetPath) 讓主程式存取插件 R 資源。android:sharedUserId 與主程式一致,共享 UID、資料庫、SharedPreferences。System.loadLibrary 路徑衝突 (ReLinker)。插件化屬進階架構,引入複雜度較高。中小專案優先考慮 模組化 (Modularization) + Dynamic Feature Module (Play Feature Delivery);大型超級 App 或需極致熱更場景才建議自研或接入成熟框架。