本文介绍了莫名的UnsatisfiedLinkError对本地库加载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

首先,我的应用程序的通常工作。我有四个32位CPU / ABI的众多客户,他们有运行的应用程序没有问题。本机库是专为所有四个架构。该库是存在的,这些方法全部到位并命名权。然而,我在一家同时获得异常报告过一次,一个本地库不能被加载:

First and foremost, my application generally works. I have numerous clients on all four 32-bit CPU/ABIs, and they have no trouble running the app. The native library is built for all four architectures. The library is there, the methods are all in place and named right. And yet, I'm getting exception reports ever once in a while that a native library can't be loaded:

java.lang.UnsatisfiedLinkError: Couldn't load foo from loader
dalvik.system.PathClassLoader [DexPathList[[zip file "/data/app/com.myapp-1.apk"],
nativeLibraryDirectories=[/data/app-lib/com.myapp-1, /vendor/lib, /system/lib]]]:
findLibrary returned null

我无法重现此,无论是在模拟器上也不在,我就可以访问多个设备。我有报告与此异常从以下设备:

I can't reproduce this, neither on the emulator nor in several devices that I've got access to. I've got reports with this exception from the following devices:

Sony Xperia LT29i (Android 4.3)
Sony Xperia C5303 (Android 4.3)
LG Optimus E405 (Android 2.3.6)

和它是非常具体的。我有27份报告,到目前为止,但只有这三个设备。所有这些都是armeabi-V7A设备,不知道它的问题。

And it's very specific. I have 27 reports so far, but only those three devices. All those are armeabi-v7a devices, not sure if it matters.

任何想法,请?

编辑:得到的部分的从擎天柱logcat的:

got some logcat from an Optimus:

I/ActivityManager(23495): process name to start: com.myapp
I/ActivityManager(23495): Start proc com.myapp for activity com.myapp/.Main: pid=5755 uid=10078 gids={3003, 1015, 1007}

就是这样。下面,没有什么会指示错误。

That's it. Nothing below that would indicate the error.

推荐答案

一个wides $ P $键盘问题影响的应用程序更新固定在4.3,但它出现的问题并没有完全消失。 最近更新到bug召唤出的Xperia设备尤其如此。卸载重装+由最终用户应该解决的问题。

A widespread problem affecting app updates was fixed in 4.3, but it appears the problem has not entirely gone away. Recent updates to the bug call out Xperia devices in particular. Uninstall + reinstall by the end user should work around the problem.

这篇关于莫名的UnsatisfiedLinkError对本地库加载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-18 06:24