Skip to content Skip to sidebar Skip to footer

Importing Android Ndk Projects (to Decode Ogg)

I am trying to decode OGG files in Android using an NDK project (I've tried a few). No matter which one I try, I always get an error similar to this when I build: Caused by: java.l

Solution 1:

The java part of the code links to a shared library object (.so file), which is obtained by compiling the C++/NDK parts of the code with ndk-build. In this case, your app is not able to find the right .so file to load. Here are a few things you could check for -

  1. Very basic check - did you run "ndk-build" inside the jni folder? If you didn't, no .so file is generated - eclipse will still compile your project, but it won't work.
  2. If your project root directory is PROJECT, check $(PROJECT)/jni/libs/armeabi or $(PROJECT)/jni/libs/armeabi-v7a - either or both of the locations should contain a .so file once you are done with the "ndk-build" command.
  3. Check that somewhere in your java code, you are invoking "System.LoadLibrary" on this .so file. I think it should be "System.LoadLibrary(videokit)", but I am not sure.

Post a Comment for "Importing Android Ndk Projects (to Decode Ogg)"