SQLitePlatformAndroid and SQLitePlatformIOS instantiation fails
Hello,
var sqlitePlatform = new SQLite.Net.Platform.XamarinAndroid.SQLitePlatformAndroid(); OR var sqlitePlatform = new SQLite.Net.Platform.XamarinAndroid.SQLitePlatformIOS();
both cause this error: "VTable setup of type SQLite.Net.Platform.XamarinAndroid.SQLiteApiAndroid failed" OR "VTable setup of type SQLite.Net.Platform.XamarinIOS.SQLiteApiIOS failed"
All refs and using statements correct. I can instantiate a SQLiteConnnection if I put this directly into the args: new SQLite.Net.Platform.XamarinAndroid.SQLitePlatformAndroid() but not by creating a sqlitePlatform first to add as an arg for the SQLiteConnection(platform, path)
This is in a Xamarin Forms shared project.
Another explanation is here: https://forums.xamarin.com/discussion/95904/sqlite-net-connections-and-xamarin-forms#latest
Please advise if at all possible.
Thanks
Kudos to the guys fixing/maintaining SQLite.Net PCL and Extensions. Whoever patched those, you've solved this particular issue!
Thank you!
Hi, @blmiles I still have this same issue, how do I fix it. This is in a Xamarin.iOS project
Actually, I didn't do anything. I noticed the day after seeing this issue, package updates was showing an update for SQLite.Net and Extensions. Updated all.
Wait!
The update adds additional and duplicate packages so I deleted ALL packages related to SQLite.Net Extensions. Re-added the SQLite.Net Extensions package only, it finds and adds the dependencies it needs. Build, run, all works.
That's why I assumed someone had updated the either/both packages.
So I update SQLite.Net then delete all packages related to .Net Extensions then add the SQLite.Net Extensions separately?
Update all SQLite related packages. Once done, check package list for duplicates but it should not harm removing all SQLite related packages then add SQLite.Net Extensions only. OR only SQLite.Net-PCL if you're not already using or intend to use SQLite.Net Extensions. No guarantee that'll help but that worked for me and eliminated that error.
Okay, thanks. Let me try that.