本文介绍了Xamarin错误System.DllNotFoundException:Android 7.0上的/system/lib/libsqlite.so的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每当我尝试在android 7.0中创建SQLite.Net.SQLiteConnection时,都会遇到此异常任何想法如何解决?我正在使用这些nuget包:

I get this exception whenever I try to create a SQLite.Net.SQLiteConnection in android 7.0any 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>

推荐答案

对我来说,解决方案是将SQLiteNetExtensions nuget软件包更新为最新的Alpha版本(预发行版),但是重要的是首先删除所有与sqlite相关的lib的引用.

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.

这篇关于Xamarin错误System.DllNotFoundException:Android 7.0上的/system/lib/libsqlite.so的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-01 12:05