How to use SQLite in a Shared Project for Android 8.0 (API Level 26)?

wmdwmd GBMember ✭✭

For over a year now I've been using the SQLite.cs and SQLiteAsync.cs classes in my xamarin.forms shared project with no issues. Note that I just have these two classes in my project, I don't have any SQLite nugets installed, since they all seem to be for PCL projects. However, Google now requires all Play Store apps to target at least API level 26. Setting the target to 26 in my project causes this well documented error:

System.DllNotFoundException: /system/lib/libsqlite.so

How can I fix this for a Shared Project? All the solutions to this problem seem to be focussed on PCL projects.

Answers

  • AndyAndy Member ✭✭

    I've been trying to get support for this as well. I've been told to use Mono.Data.Sqlite in my Xamarin.Forms / .NET Standard project. This requires using dependency injection and writing your own interface for Forms projects. Terrible solution.
    Microsoft should provide a Xamarin Forms/.NET Standard Sqlite library (say Microsoft.Data.Sqlite support for Xamarin forms?)

    PCL works only for apps with simple data access requirements.

  • wmdwmd GBMember ✭✭
    edited October 2018

    After a years worth of work, my app is now at a complete stand still because of this issue. It would be nice if there was some help from the Xamarin people instead of the thread being ignored for days on end. This is a serious show-stopper, with no available solutions on the web.

  • JosFra21JosFra21 Member ✭✭

    Did you find the solution? I am having the same issues and nobody explains what to do.

  • wmdwmd GBMember ✭✭

    No solution. Astonishing that such a critical issue goes ignored. We simply won't be able to distribute our apps on Google Play.

Sign In or Register to comment.