Load library works when in debug from VS, but not when I start the app manually

ViishViish FRMember

Hello,

I have an issue with my Android application. It uses native libraries that I load using Java.Lang.JavaSystem.LoadLibrary("linphone");.
When I start the app with the debugger from VS it works just fine, but it fails if I launch the app from the device icon.

Here are the errror I get when I click on the application icon:

03-16 11:54:02.004 29087 29087 I MonoDroid: Java.Lang.UnsatisfiedLinkError: dlopen failed: cannot find "libc.so" from verneed[0] in DT_NEEDED list for "/data/app/org.linphone.xamarin-1/lib/x86/liblinphone.so"

I have the problem no matter the device I use (some are x86, some armv7-eabi, some arm64-v8a).

Tagged:

Answers

  • ViishViish FRMember

    Here are the full logs

  • ViishViish FRMember

    I guess the problem is the directory where the libc is isn't in the LD_LIBRARY_PATH when I'm not debugging from Visual Studio but why ? And how can I fix this ?

    Any help will be greatly appreciated, thanks.

  • ViishViish FRMember

    Looks like it is caused by my library having a file name different than it's soname...
    Anyone knows why ?

  • StefanMarekStefanMarek USMember ✭✭

    can you explain your last comment ? what did you rename to fix it ?

Sign In or Register to comment.