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

风流意气都作罢 提交于 2019-12-01 04:06:50

问题


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>

回答1:


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




回答2:


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.




回答3:


i have same issue in my xamarin android. i install this package for sqlite and set targeted version to android 8(oreo) my application works again



来源:https://stackoverflow.com/questions/40930643/xamarin-error-system-dllnotfoundexception-system-lib-libsqlite-so-on-android-7

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!