Reputation: 524
SQLite.Net.Standard is not working in Android 8 in Xamarin Forms. What is the alternative ?
I installed SQLIte.Net.Standard but found i was getting "Unhandled Exception: System.DllNotFoundException: /system/lib/libsqlite.so occurred" at runtime.
Further reading indicated that starting with Android 7, access to this lib was removed or restricted. Supposedly the fix was using a different Nuget package. SQLite.Net.Platform.XamarinAndroidN
Upvotes: 0
Views: 272
Reputation: 81
I use the alternative NuGet Package sqlite-net from praeclarum with Android 8 + 9 devices and had no problems so far.
Usage:
var db = new SQLiteConnection(Path.Combine(dbPath, dbFile));
db.CreateTable<YourModel>();
var yourObject = new YourModel();
db.Insert(yourObject);
Upvotes: 1