How did you compile the library if you didn't use the NDK?. There are great
chances that what you generated is not a valid ARM ELF binary that can be
loaded on Android.

On Tue, May 25, 2010 at 6:31 AM, Karteek N <kartee...@gmail.com> wrote:

> Hi all,
> I have gone through android ndk tutorials.
> But i am little confusing in Android.mk file as well as Application.mk file
> so instead of that i used the following approach
> I created a Test.java file which is having one native method.
> i added the static{
>
> System.loadLibrary("mylib");
> }
> By using javah -jni i generated Test.h and using that decleration i
> implemented  a c file
> And i compiled c file and generated the libmylib.so library.
> But now my question is how to add this shared library to my android
> application
> I followed 2 approaches but all throwing exception that Library mylib not
> founed.
> 1 In eclipse BuildPath->ConfigurebuildPath->Android2.1->native given the
> path of my shared library
> 2 I copied shared library to /data/data/myprojectpackagenae/lib/
>   and used the statement in my code as
>    System.load("/data/data/mypackagename/lib/libmylib.so");
>
> In above two cases it is throwing same exception
>
> Where iam wrong?
> Is it  procedure is wright?
> Please help me
>
> --
> 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
> android-developers+unsubscr...@googlegroups.com<android-developers%2bunsubscr...@googlegroups.com>
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to