Forum Xamarin.Android

DllNotFoundException with AndroidNativeLibrary


I have an .so library named in my Android app's lib/armeabi-v7a folder, with build action set to AndroidNativeLibrary, and the project properties (in Visual Studio 2012) set to support only that ABI. My code looks like this:

public class Ocr : IDisposable
private static extern void DoSomething(int i);

    public void TestDoSomething(int i)

    public void Dispose()
        // TODO: deallocate c++ object


And when DoSomething(i) is called, I get a DllNotFoundException for that library. How can I get it to find the library?

I did "pm list packages -f" on the adb shell and saw my apk, but not the .so (I'm assuming those might should be visible also but not sure)

Sign In or Register to comment.