0

Now I compiled the libharu into so, but when I write the code :System.LoadLibrary, it can't work, the error message is:

java.lang.UnsatisfiedLinkError: Couldn't load libharu.so: findLibrary returned null

What's up?

Cœur
  • 37,241
  • 25
  • 195
  • 267
jimtoner
  • 11
  • 2

2 Answers2

0

What is the LOCAL_MODULE in your Android.mk file whie compiling? In my case it is LOCAL_MODULE := hpdf. So it creates libhpdf.so file and you need to System.loadLibrary("hpdf");

Mayur
  • 46
  • 1
  • 7
0

What is the name of so file? Are you sure it is in the lib\armeabi folder in eclipse?

You should load with System.loadLibrary("libharu"), not with .so extension.

Peterdk
  • 15,625
  • 20
  • 101
  • 140
  • Yes, I am sure, I deleted the .so extension, but it still can't work, I think that my libharu.so may have something wrong. – jimtoner Feb 08 '12 at 11:59
  • To be clear, you didn't delete the extension of the file itself, only in the loadlibrary variable? – Peterdk Feb 08 '12 at 13:05