Tencent / Shadow

零反射全动态Android插件框架
BSD 3-Clause "New" or "Revised" License
7.47k stars 1.31k forks source link

throw new RuntimeException("packageArchiveInfo is NullPointException") #1299

Closed ClarkRep closed 6 months ago

ClarkRep commented 8 months ago

三星Android7.0系统,加载PluginManager的时候报错,这里packageArchiveInfo为null了,请问怎么解决呢?
PackageInfo packageArchiveInfo = packageManager .getPackageArchiveInfo(apkPath, GET_META_DATA); if (packageArchiveInfo == null) { throw new RuntimeException("packageArchiveInfo is NullPointException"); }

shifujun commented 8 months ago

packageArchiveInfo is NullPointException

我搜不到这个代码。

这个api很稳定。特别是在旧版本的Android上更不应该有问题。 所以就算真的有问题,也没什么好办法了。非要针对性兼容,就考虑hardcode所需的信息吧。

zhuqichao commented 7 months ago

这个一般是apk文件出问题了,损坏或者被删除了