System.DllNotFoundException: /system/lib/libsqlite.so- Xamarin Forms
System.DllNotFoundException: /system/lib/libsqlite.so- Xamarin Forms
I am facing SQLite issue in xamarin forms project. However SQLiteConnection
I am trying to instantiating in Android project where exactly getting exception.
SQLiteConnection
Android version target 8.1 to 4.4.
Libraries using in android & iOS project
AndroidSQLite .cs file
using SQLite;
using SQLite.Net;
using System.IO;
namespace XamarinTestList.Droid.Implementations
public class AndroidSQLite : ISQLite
public SQLiteConnection GetConnection()
string documentPath = System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal);
var path = Path.Combine(documentPath, DatabaseHelper.DbFileName); //DbFileName="Contacts.db"
var plat = new SQLite.Net.Platform.XamarinAndroid.SQLitePlatformAndroid();
string dpPath = System.IO.Path.Combine(System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal), "user.db3");
var conn= new SQLiteConnection(plat, dpPath);
return conn;
Getting exception at
var conn= new SQLiteConnection(plat, dpPath);
{System.DllNotFoundException: /system/lib/libsqlite.so at (wrapper
managed-to-native)
SQLite.Net.Platform.XamarinAndroid.SQLiteApiAndroidInternal.sqlite3_open_v2(byte,intptr&,int,intptr)
at SQLite.Net.Platform.XamarinAndroid.SQLiteApiAndroid.Open
(System.Byte filename, SQLite.Net.Interop.IDbHandle& db,
System.Int32 flags, System.IntPtr zvfs) [0x00000] in
<8dbf6ff85082469fb9d4dfaa9eae6b69>:0 at
SQLite.Net.SQLiteConnection..ctor (SQLite.Net.Interop.ISQLitePlatform
sqlitePlatform, System.String databasePath,
SQLite.Net.Interop.SQLiteOpenFlags openFlags, System.Boolean
storeDateTimeAsTicks, SQLite.Net.IBlobSerializer serializer,
System.Collections.Generic.IDictionary2[TKey,TValue] tableMappings,
2[TKey,TValue]
System.Collections.Generic.IDictionary
extraTypeMappings, SQLite.Net.IContractResolver resolver) [0x000a2] in
<8f2bb39aeff94a30a8628064be9c7efe>:0 at
SQLite.Net.SQLiteConnection..ctor (SQLite.Net.Interop.ISQLitePlatform
sqlitePlatform, System.String databasePath, System.Boolean
storeDateTimeAsTicks, SQLite.Net.IBlobSerializer serializer,
System.Collections.Generic.IDictionary2[TKey,TValue] tableMappings,
2[TKey,TValue]
System.Collections.Generic.IDictionary
extraTypeMappings, SQLite.Net.IContractResolver resolver) [0x00000] in
<8f2bb39aeff94a30a8628064be9c7efe>:0
2[TKey,TValue] tableMappings,
System.Collections.Generic.IDictionary
2[TKey,TValue] tableMappings,
System.Collections.Generic.IDictionary
Shared project, where no option available to install Nuget packages. Initially here only two file was there App.xaml & Main.xaml.
Following this article to learn SQLite with xamarin
xamarin forms-mvvm-sqlite-sample.
@Gerald Versluis- Packages I have added across projects(I selected 3 projects including shared project while adding packages). But it doesn't seem there is an option to install packages in shared project. See my updated question where I added screenshot of shared project.
– Arvindraja
Aug 28 at 9:18
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
Did you install the NuGet on both your platform and shared code project?
– Gerald Versluis
Aug 28 at 7:53