开发者

How do I debug System.load link exception on Android Froyo?

开发者 https://www.devze.com 2023-01-15 11:53 出处:网络
On froyo, when I get a Link exception while loading a library, it does not give the symbol that it could not find! On eclair, there used to be a helper message saying \"cannot l开发者_Go百科ocate xyz

On froyo, when I get a Link exception while loading a library, it does not give the symbol that it could not find! On eclair, there used to be a helper message saying "cannot l开发者_Go百科ocate xyz symbol'. Without, this information, how do I debug this library load error on Froyo? I am using System.load to load libabcjni.so.

When I build the testapp, I can see the following line for libabcjni.so:

adding: lib/armeabi/libabcjni.so (deflated 75%)

Android log:

D/BLURDAEMON( 3653): onCreate()
D/DaemonManager( 3653): Going to load native lib
D/BlurMbus::Loader( 3653): File: /data/data/com.abc.testapp/files/libabcjni.so
D/BlurMbus::Loader( 3653): Size: 1012148
D/BlurMbus::Loader( 3653): Going to System.load
D/dalvikvm( 3653): Trying to load lib /data/data/com.abc.testapp/files/libabcjni.so 0x449214a8
I/dalvikvm( 3653): Unable to dlopen(/data/data/com.abc.testapp/files/libabcjni.so): Cannot load library: link_image[1995]: failed to link libabcjni.so
I/dalvikvm( 3653):
D/BlurMbus::Loader( 3653): Link Exception Library /data/data/com.abc.testapp/files/libabcjni.so not found
E/BlurMbus::NativeInterface( 3653): Error loading ---->libabcjni <----


I've just found http://mpigulski.blogspot.com/2010/09/debugging-dlopen-unsatisfiedlinkerror.html

0

精彩评论

暂无评论...
验证码 换一张
取 消