DllNotFoundException with AndroidNativeLibrary

Hello,

I have an .so library named libezrocr.so 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:

[code]
public class Ocr : IDisposable
{
[DllImport("ezrocr")]
private static extern void DoSomething(int i);

    public void TestDoSomething(int i)
    {
        DoSomething(i);
    }

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

[/code]

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.