I had read the discussion about "Unresolved symbol & JNI",
But I believe there are some difference with my problem.

Logcat :
DEBUG/dalvikvm(786): +++ not scanning '/system/lib/libwebcore.so' for
'add' (wrong CL)
DEBUG/dalvikvm(786): +++ not scanning '/system/lib/libmedia_jni.so'
for 'add' (wrong CL)
WARN/dalvikvm(786): No implementation found for native Lproject/
testjni/NativeAdd;.add (I)I
DEBUG/dalvikvm(786): Exception Ljava/lang/UnsatisfiedLinkError; from
TestJNI.java:15 not caught locally
DEBUG/dalvikvm(786): Exception Ljava/lang/UnsatisfiedLinkError; from
ZygoteInit.java:1555 not caught locally
DEBUG/AndroidRuntime(786): Shutting down VM

my symbol table:
$ arm-none-linux-gnueabi-objdump -T libNativeAdd.so

libNativeAdd.so:     file format elf32-littlearm

DYNAMIC SYMBOL TABLE:
0000022c l    d  .text  00000000 .text
00000268 g    D  *ABS*  00000000 __exidx_end
000002cc g    D  *ABS*  00000000 _bss_end__
000002cc g    D  *ABS*  00000000 __bss_start__
00000268 g    D  *ABS*  00000000 __exidx_start
000002cc g    D  *ABS*  00000000 __bss_end__
0000022c g    DF .text  0000003c Java_project_testjni_TestJNI_add
000002cc g    D  *ABS*  00000000 __bss_start
000002cc g    D  *ABS*  00000000 __end__
000002cc g    D  *ABS*  00000000 _edata
000002cc g    D  *ABS*  00000000 _end
000002cc g    D  .got   00000000 __data_start

I didn't call any other function in the library,
the function "Java_project_testjni_TestJNI_add" do nothing except
return a const value.

My shared library name is "libNativeAdd.so", but system doesn't find
it ?
Need I register it somewhere?


On 4月9日, 下午6时05分, David Given <[EMAIL PROTECTED]> wrote:
> Macro wrote:
>
> [...]
>
> > But while running loadLibrary("libNativeAdd"), the same as before, it
> > throw a "UnsatisfiedLinkError" exception.
>
> You almost certainly have unresolved symbols in your library. Try using
> objdump -T to dump the symbols in the .so and see if there's anything
> interesting there.
>
> Look for a thread with the title 'Unresolved symbols &JNI' for more
> information.
>
> --
> David Given
> [EMAIL PROTECTED]
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to