Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Loading a native library for Android using Eclipse

I'm fairly new to Android development and I've been trying for a while now but I just don't get it. I'm writing an app for android that creates gifs, and for that I'm using this library. I compiled it into an .so but now I just don't understand how to actually load it. I put the .so in /libs/armeabi/ but when I load it like

    static {
        System.loadLibrary("gifflen");
    }    

it throws

   ERROR/AndroidRuntime(13565): Caused by: java.lang.UnsatisfiedLinkError: Couldn't load gifflen: findLibrary returned null

Am I supposed to put it somewhere else? Or is this because of some setting in Eclipse I was supposed to change? I've mucked about with the native library option in Java Build Path but that doesn't seem to be what I'm looking for. I've also googled around a bit and found an answer that said to select select Android Tools->Add Native Support but I don't have that option.

like image 791
Dmiters Avatar asked May 23 '11 03:05

Dmiters


1 Answers

You built into into an .so how? Using the NDK? If so then the file that was created should have been called libgrifflen.so. Was it?

like image 162
CaseyB Avatar answered Sep 23 '22 19:09

CaseyB