Skip to content

Commit 6687f3a

Browse files
committed
update plugin assetManager object instance
1 parent 2169a7b commit 6687f3a

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed
40 Bytes
Binary file not shown.

pluginapk/src/main/java/com/malin/plugin/PluginResourceUtil.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ object PluginResourceUtil {
2222
try {
2323
val dexFile = context.getFileStreamPath("pluginapk-debug.apk")
2424
// 执行此addAssetPath(String path) 方法,能把插件的路径添加进去
25-
val assetManager = AssetManager::class.java.newInstance()
25+
val assetManager = AssetManager::class.java.getDeclaredConstructor().newInstance()
2626
val addAssetPathMethod =
2727
assetManager.javaClass.getDeclaredMethod("addAssetPath", String::class.java)
2828
addAssetPathMethod.isAccessible = true

0 commit comments

Comments
 (0)