Forum Xamarin.Android
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

Native library does not find its (system) dependencies


I would like to try to use the GPU to speed up some of my app's calculations. My hope is that it is possible to create a native library which does the calculations on the GPU via OpenCL. The android system I am debugging on has OpenCL installed (the so-files are in /system/vendor/lib).

When starting the app, the app finds my own wrapper-library, tries to load it, and eventually fails because it does not find
My impression is that, for some reason, the app does not search in /system/vendor/lib for potentially required libraries.

I have tried circumventing the problem by adding the to the APK of my app. Now DllImport can load the, but fails at finding its dependencies (e.g., which itself is again in /system/vendor/lib).

Is there a way to define additional search directories for the DllImport? Or what is the proper method for importing system libraries?


Sign In or Register to comment.