Java Question java.lang.UnsatisfiedLinkError ... couldn't find "libserial_port.so

RonkyOne

Member
Licensed User
Longtime User
Hi guys,

I am trying to include native .so files in a Java library. Starting with the LameB4A project as example, I tried to do the same, see Wrapper.zip, but I cannot get it to work.
I have both tried the Simple Library Compiler as well as exporting directly from Eclipse.
I have tried placing the .so files under libs, under lib, under additional, and also under additional/lib.

I always get the same error:
java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/flm.b4a.testdialogs-1/base.apk"],nativeLibraryDirectories=[/data/app/flm.b4a.testdialogs-1/lib/arm, /vendor/lib, /system/lib]]] couldn't find "libserial_port.so"

I also tried copying the file to File.DirInternal, "lib/armeabi-v7a/libserial_port.so" (confirmed, File.Exists returns True for that path), but to no avail.

Any help greatly appreciated.
 

Attachments

  • Wrapper.zip
    31.4 KB · Views: 233
  • LAME_B4A.zip
    301.1 KB · Views: 241

RonkyOne

Member
Licensed User
Longtime User
Hello Erel,
thanks for your quick reply.

Just as I ran it again to copy the full error message, it started working, no changes made since yesterday.
Although I am happy it works now, I am rather frustrated since I spent several hours troubleshooting.

Best regards,
Stefano
 
Top