Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

可以考虑增加回调接口,允许使用 ReLinker 来加载 .so 文件吗? #18

Closed
jhwsx opened this issue Dec 2, 2019 · 5 comments

Comments

@jhwsx
Copy link
Contributor

jhwsx commented Dec 2, 2019

出错log:

java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.sail.advanced.booster-1/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]] couldn't find "libun7zip.so"
    at java.lang.Runtime.null loadLibrary(null)(Runtime.java:366)
    at java.lang.System.null loadLibrary(null)(System.java:989)
    at com.hzy.lib7z.Z7Extractor.void <clinit>()(Z7Extractor.java:91)
    at com.hzy.lib7z.Z7Extractor.int extractAsset(android.content.res.AssetManager,java.lang.String,java.lang.String,com.hzy.lib7z.IExtractCallback)(Z7Extractor.java:57)
    at com.library.clean.db.DBHelper.void copyRawDBToApkDb()(DBHelper.java:40)
    at com.library.clean.CleanSdk$1.void run()(CleanSdk.java:25)
    at com.sharp.tooklit.threadhelper.ThreadPool$TaskWithPriority.void run()(ThreadPool.java:165)
    at java.util.concurrent.ThreadPoolExecutor.null runWorker(null)(ThreadPoolExecutor.java:1112)
    at java.util.concurrent.ThreadPoolExecutor$Worker.null run(null)(ThreadPoolExecutor.java:587)
    at java.lang.Thread.null run(null)(Thread.java:818)

只在个别机型上出现,目前看到的是 API 19, 占得比例也较小。

mmkv 的建议方案:

在某些 Android 设备上(API level 19)遇到java.lang.UnsatisfiedLinkError。这是怎么回事,我应该采取什么措施?
API level 19 的 Android 设备在安装、更新 APK 时,可能会遗漏 libmmkv.so。针对这个问题,已有专门的开源库 ReLinker 解决。

@huzongyao
Copy link
Collaborator

会考虑解决这个问题,感谢建议

@jhwsx
Copy link
Contributor Author

jhwsx commented Dec 2, 2019

这边提交了一个PR,可以帮忙 review 一下。

@jhwsx
Copy link
Contributor Author

jhwsx commented Dec 2, 2019

方便的话,可以 release 一版吗?这边有几个产品都用了这个库。

@huzongyao
Copy link
Collaborator

好的,我稍后发布一个

@huzongyao
Copy link
Collaborator

已提交jcenter,感谢PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants