Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xamarin error System.DllNotFoundException: /system/lib/libsqlite.so on Android 7.0

I get this exception whenever I try to create a SQLite.Net.SQLiteConnection in android 7.0 any idea how to fix it? I'm using these nuget pacakges:

<packages>
  <package id="ExifLib.PCL" version="1.0.1" targetFramework="monoandroid6" />
  <package id="Microsoft.Bcl" version="1.1.10" targetFramework="monoandroid43" />
  <package id="Microsoft.Bcl.Build" version="1.0.21" targetFramework="monoandroid43" />
  <package id="Newtonsoft.Json" version="7.0.1" targetFramework="monoandroid6" />
  <package id="SQLite.Net.Core-PCL" version="3.1.1" targetFramework="monoandroid6" />
  <package id="SQLite.Net-PCL" version="3.1.1" targetFramework="monoandroid6" />
  <package id="SQLiteNetExtensions" version="1.3.0" targetFramework="xamarinios1" />
  <package id="sqlite-net-pcl" version="1.2.1" targetFramework="monoandroid70" />
  <package id="SQLitePCL.bundle_green" version="0.9.3" targetFramework="monoandroid60" />
  <package id="SQLitePCL.plugin.sqlite3.android" version="0.9.3" targetFramework="monoandroid60" />
  <package id="SQLitePCL.raw" version="0.9.3" targetFramework="monoandroid60" />
  <package id="SQLitePCLRaw.bundle_green" version="1.1.1" targetFramework="monoandroid70" />
  <package id="SQLitePCLRaw.core" version="1.1.1" targetFramework="monoandroid70" />
  <package id="SQLitePCLRaw.lib.e_sqlite3.android" version="1.1.1" targetFramework="monoandroid70" />
  <package id="SQLitePCLRaw.provider.e_sqlite3.android" version="1.1.1" targetFramework="monoandroid70" />
  <package id="Xam.Plugins.Settings" version="2.5.1.0" targetFramework="monoandroid60" />
  <package id="Xamarin.Android.Support.Animated.Vector.Drawable" version="23.3.0" targetFramework="monoandroid60" />
  <package id="Xamarin.Android.Support.CustomTabs" version="23.3.0" targetFramework="monoandroid60" />
  <package id="Xamarin.Android.Support.Design" version="23.3.0" targetFramework="monoandroid60" />
  <package id="Xamarin.Android.Support.v4" version="23.3.0" targetFramework="monoandroid60" />
  <package id="Xamarin.Android.Support.v7.AppCompat" version="23.3.0" targetFramework="monoandroid60" />
  <package id="Xamarin.Android.Support.v7.CardView" version="23.3.0" targetFramework="monoandroid60" />
  <package id="Xamarin.Android.Support.v7.MediaRouter" version="23.3.0" targetFramework="monoandroid60" />
  <package id="Xamarin.Android.Support.v7.RecyclerView" version="23.3.0" targetFramework="monoandroid60" />
  <package id="Xamarin.Android.Support.Vector.Drawable" version="23.3.0" targetFramework="monoandroid60" />
  <package id="Xamarin.FFImageLoading" version="2.2.5" targetFramework="monoandroid70" />
  <package id="Xamarin.FFImageLoading.Forms" version="2.2.5" targetFramework="monoandroid70" />
  <package id="Xamarin.Forms" version="2.3.3.168" targetFramework="monoandroid70" />
  <package id="Xamarin.GooglePlayServices.Ads" version="29.0.0.1" targetFramework="monoandroid60" />
  <package id="Xamarin.GooglePlayServices.Analytics" version="29.0.0.1" targetFramework="monoandroid60" />
  <package id="Xamarin.GooglePlayServices.AppIndexing" version="29.0.0.1" targetFramework="monoandroid60" />
  <package id="Xamarin.GooglePlayServices.Base" version="29.0.0.1" targetFramework="monoandroid60" />
  <package id="Xamarin.GooglePlayServices.Basement" version="29.0.0.1" targetFramework="monoandroid60" />
  <package id="Xamarin.Insights" version="1.12.3" targetFramework="monoandroid60" />
</packages>
like image 982
fire in the hole Avatar asked Dec 02 '16 11:12

fire in the hole


2 Answers

I think you are using oystein.krog package You should try with praeclarum package

like image 111
Alessandro Caliaro Avatar answered Oct 13 '22 10:10

Alessandro Caliaro


The solution for me was to update the SQLiteNetExtensions nuget package to the latest Alpha version (prerelease), it's important to first remove all references to sqlite related libs though.

like image 20
fire in the hole Avatar answered Oct 13 '22 08:10

fire in the hole