Mono Android Monodroid Native Library DllNotFoundException

前端 未结 3 1242
庸人自扰
庸人自扰 2021-02-06 19:23

I am attempting to get a Native C/C++ library working with Monodroid in the emulator, using DllImport. I am developing mainly in Windows/Visual Studio 2010.

I have built

3条回答
  •  星月不相逢
    2021-02-06 19:38

    I don't have any immediate ideas why it isn't working for you; [DllImport("zmq")] should work.

    The SanityTests sample exercises the DllImport attribute.

    • The DllImport: https://github.com/xamarin/monodroid-samples/blob/master/SanityTests/Hello.cs#L240
    • The Android.mk to build libfoo.so: https://github.com/xamarin/monodroid-samples/blob/master/SanityTests/jni/Android.mk
    • Building libfoo.so by calling ndk-build: https://github.com/xamarin/monodroid-samples/blob/master/SanityTests/SanityTests.csproj#L82
    • Including libfoo.so into the .apk: https://github.com/xamarin/monodroid-samples/blob/master/SanityTests/SanityTests.csproj#L96

提交回复
热议问题