Reputation: 412
I have implemented Linphone in Xamarin forms. It is working fine in iOS but it is crashing in Android.It shows this exception
System.DllNotFoundException
linphone.framework/linphone assembly:<unknown assembly> type:<unknown type> member:(null)
It shows the exception after the following code
CoreListener listener = Factory.Instance.CreateCoreListener();
Is there any specific Android SDK I need to download for Linphone to work? I have no clue how to fix this. Any suggestions?
Upvotes: 2
Views: 413
Reputation: 412
I fixed this by doing a minor change in code.
#if WINDOWS_UWP
public const string BELLE_SIP_LIB_NAME = "bellesip";
public const string BCTOOLBOX_LIB_NAME = "bctoolbox";
#else
public const string BELLE_SIP_LIB_NAME = "linphone";
public const string BCTOOLBOX_LIB_NAME = "linphone";
#endif
I changed the public const string BELLE_SIP_LIB_NAME = "linphone.framework/linphone";
to public const string BELLE_SIP_LIB_NAME = "linphone";
. I think some libraries are missing in linphone.framework.
Upvotes: 0
Reputation: 1330
I've had similar issues with other 3rd party libraries and I found that the linker is causing the problem. Have you tried turning the linker off?
Here's how to do it on VS 2022:
Right-click on your Xamarin.Android project > Properties > Android Options > Linker properties > Set Linking to None
for your desired configuration
Have a look at this page for more information on linking
Upvotes: 1
Reputation: 123
The main try is the clear/rebuild solution, then try uninstall and reinstall the library, since it's a dllNotFound Exception and if the other ones doesn't work you can try to find your missing DLL from here (but for this one you have to figure out which dll file you're missing).
I know these are easy things but maybe you didn't think about it at the time
Upvotes: 1