Forum Xamarin Xamarin.Android

Trying to execute C native code without success

CarlosCMCarlosCM USMember ✭✭


I'm new to Xamarin, and I need to execute native code but with no luck. I have only tried with Android for now.

Building the .so library wasn't a problem, but getting the application to load it is being impossible!

As far as I understand (according to this doc), I only have to add the reference to the Android project and that's all, but if I inspect the APK, the .so library is not included. I have searched a lot, but I can't find the solution.

The only way I can add the .so library to the APK is adding it in the Android project, but still with no luck. The application can't find the .so library.

So, I went to the SanAngeles demo, downloaded it and opened it with Visual Studio 2015. It made some updates at load time (regarding Clang and Android version), and I got surprised with the same exact error when I executed the application: System.DllNotFoundException

The generated APK doesn't has the .so library included either.

Please, can someone point me in the right direction?

Thanks a lot!


  • CarlosCMCarlosCM USMember ✭✭

    I just got the application to load the .so library (you know, following the law "post it, solve it"...), BUT I'm not able to debug the native code.

    The problem is (I suppose) that I'm adding the .so library directly to the project, instead of solving the reference and let Visual Studio doing that work, but I can't find how to do it.

Sign In or Register to comment.