SQLite problems with Android 7.1 & Android 8.0

I am using VS 2017 and latest Xamarin tools to create a cross platform Xamarin.Forms project that uses .NET Standard library instead of PCL.

I installed SQLIte.Net.Standard but found i was getting "Unhandled Exception: System.DllNotFoundException: /system/lib/libsqlite.so occurred" at runtime.

Further reading indicated that starting with Android 7, access to this lib was removed or restricted. Supposedly the fix was using a different Nuget package.
SQLite.Net.Platform.XamarinAndroidN

When I attempt to install this package into my Android project, I get:

Package SQLite.Net.Platform.XamarinAndroidN 3.1.1 is not compatible with monoandroid80
So, just for giggles, I changed my target to Android 7.1 and tried importing the Nuget package again this time gettting:
Package SQLite.Net.Platform.XamarinAndroidN 3.1.1 is not compatible with monoandroid71.

Does anyone know what I am doing wrong?
Is anyone out there successfully using SQLite in an Android project targeting 7.0 or 8.0 ? If so, what Nuget package are you using?

Thanks for any help.

Tagged:

Posts

  • AlanStrattonAlanStratton USMember ✭✭

    Not sure why I tried going down the path of these Nugets, but I have gave up on them.

    1. SQLite.Net.Standard
    2. SQLite.Net.Platform.XamarinAndroidN

      I went back to the Xamarin docs and ended up using what is says is best, which appears to work fine with my .NET Standard2.0 library

    sqlite-net-pcl 1.4.118 (SQLite-net Official Portable Library)

  • ssilvassilva USMember

    I have the same problem, did you find what to do to work with this?

Sign In or Register to comment.