david,
    i have modified my project according to your suggestion.
    <1> remove the following
           //#include <stdio.h>
          //printf("hello testjni\n");
    <2> add simple calculation function

but the problem exist yet.

ps:
HelloAndroid.apk is build in android-sdk with eclipse under windows.
libtestjni.so is build under linux.
i don't think there is trouble thus.



On Apr 17, 6:39 pm, David Given <[EMAIL PROTECTED]> wrote:
> stavy.sun wrote:
>
> [...]
>
> > #include <stdio.h>
> [...]
> >    printf("hello testjni!\n");
>
> I think this is your problem; I don't think you can call printf() from
> Android'sJNIenvironment.
>
> (Android has its own libc that is *not* compatible with the glibc
> headers that the CodeSourcery toolchain comes with. While you can bodge
> it and make it work, sort of, it's not very reliable. I'd suggest you
> limit your code to simple calculations and do all your I/O through Java.)
>
> --
> 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 [email protected]
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