>From what I've seen, the "library not found" error doesn't only occur
if the library cannot be found, however your first step now should
probably be to see if it should be found... open an "adb shell" to
your platform, and change directory to /data/data/
your.package.name.here. Does the lib directory exist? If so, is
your .so inside it? If the answer to either of these is no, you're not
including the library in the package correctly.

If the file does exist, the failure to load is based on the exported
contents of the library. In this case, you'll want to work with one of
the sample libraries that come with the NDK and compare it to your own
to figure out what's missing.

On Jun 1, 4:28 am, karteek <kartee...@gmail.com> wrote:
> You are wright.
> Now i compiled with  following commands
> arm-none-linux-gnueabi-gcc -fPIC -c sample.c -o sample.o
> arm-none-linux-gnueabi-gcc -shared -Wl,-soname,libmylib.so -o
> libmylib.so sample.o
>
> even though iam getting the same problem
>
> On May 29, 2:34 am, mah <m...@heilpern.com> wrote:
>
> > That would likely mean you've compiled your library using an x86
> > compiler. That will not run on an ARM processor.
>
> > You do not have to use the Android makefile or build system to build
> > your library, but you do need to use the compiler that comes with the
> > NDK.
>
> > On May 27, 3:05 am, karteek <kartee...@gmail.com> wrote:
>
> > > > How did you compile the library if you didn't use the NDK?.
>
> > > I compiled using the following commands
> > > cc -c -fPIC mycfile.c -o mycfile.o
> > > cc -o libmylib.so -shared -Wl,-soname,libmy.so mycfile.o
>
> > > On May 27, 11:03 am, David Turner <di...@android.com> wrote:
>
> > > > 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