Xamarin Form Sqlite Connection : Method Not Found: Int Sqlite.sqliteconnection.createtable(sqlite.createflags)
Solution 1:
It's annoying, but there's a very good chance you're going to have to delete all of those packages and reinstall them. Try to remove them and add the following packages
SQLitePCLRaw.bundle_green Version 1.1.2 in your native projects (Not in PCL)
SQLitePCLRaw.core Version 1.1.2 in your native projects (Not in PCL)
SQLitePCLRaw.lib.e_sqlite3.android Version 1.1.2
SQLitePCLRaw.provider.e_sqlite3.android Version 1.1.2
SQLitePCLRaw.provider.sqlite3.ios_unified Version 1.1.2
and then when you create the database, initialise it using the following code as the path:
stringpath = System.IO.Path.Combine(System.Environment
.GetFolderPath(System.Environment.SpecialFolder.Personal), "localstore.db");
OR
If that doesn't work, remove all of them and only add the following one all of your projects
https://www.nuget.org/packages/sqlite-net-pcl/
I hope this helps
Solution 2:
As Janwilx72 said that you need to install sqlite-net-pcl package by Nuget for Pcl and Platforms. Don't need the package that you provided.
Then you can use SQLiteConnection.CreateTable() and have no issue.
I do one sample for Android at github, that you can take a look:
https://github.com/CherryBu/sqliteapp
If you want to do this in ios or other platform, you can take a look this article:
https://dzone.com/articles/register-and-login-using-sqlite-in-xamarinforms

Post a Comment for "Xamarin Form Sqlite Connection : Method Not Found: Int Sqlite.sqliteconnection.createtable(sqlite.createflags)"