Android Nougat made a change such that it permits linking only to NDK-provided native libraries, and
is not an NDK-provided native library. As a result, any attempt to
will result in a crash. More information on this can be found in the
Xamarin.Android 6.2 release notes
Xamarin.Android developers currently use
, which uses platform-independent code to get around this problem. However, the Portable Class Library for SQLite appears to be using the
library provided by the Android OS, and thus fails when it runs on Android Nougat.
To verify this, I created two simple SQLite apps:
: uses the
Portable Class Library for SQLite
I'm using the
Xamarin.Android N Preview
with Visual Studio 2015, testing with Google's emulators on Windows 10 (Nexus5 images, configured for Android Lollipop and Android Nougat).
works on both Lollipop and Nougat.
works on Lollipop but fails on Nougat.
fails on Nougat, it produces errors in the output window like this:
library "/system/lib/libsqlite.so" ("/system/lib/libsqlite.so") needed or dlopened by "/data/app/Mono.Android.DebugRuntime-1/lib/x86/libmonosgen-32bit-2.0.so" is not accessible for the namespace
I've attached the project that fails.