0

I'm using sqlite-net-pcl for Xamarin Forms / Xamarin Andriod the previous library SQLite.Net-PCL are crashing at run time because its no longer being maintained by it's author as mentioned here .

The problem that i'm facing with sqlite-net-pcl is when creating SQLiteConnectionWithLock
specific with ISQLitePlatform parameter

new SQLiteConnectionWithLock(ISQLitePlatform, new SQLiteConnectionString(path, true));

Parameter ISQLitePlatform are interface I tried to implement the interface but I didn't figure out the correct implementation

class SQLitePlatform : ISQLitePlatform
    {
        ISQLiteApi ISQLitePlatform.SQLiteApi => throw new System.NotImplementedException();
        IStopwatchFactory ISQLitePlatform.StopwatchFactory => throw new System.NotImplementedException();
        IReflectionService ISQLitePlatform.ReflectionService => throw new System.NotImplementedException();
        IVolatileService ISQLitePlatform.VolatileService => throw new System.NotImplementedException();
    }
6
  • 3
    I don't see ISQLitePlatform anywhere in that pkg's github repo? Commented Sep 30, 2019 at 20:47
  • Inside SQLite.Net.Interop.ISQLitePlatform Commented Sep 30, 2019 at 20:48
  • 1
    I believe that what Jason was saying is that the constructor for this class SQLiteConnectionWithLock has only one parameter and it's the SQLiteConnectionString at least for the latest version 1.6.292. public SQLiteConnectionWithLock (SQLiteConnectionString connectionString); what version do you have installed? @DevC Commented Oct 1, 2019 at 5:37
  • 1
    Thanks Jason & @Pinedax I just check the packages and I notice their another package named SQLite.Net.Async-PCL I removed it and its works. Commented Oct 1, 2019 at 7:03
  • 1
    Could you please put the answer below, so we can resolve the question and its easily searchable Commented Oct 2, 2019 at 23:09

1 Answer 1

1

I checked the Packages i had in my solution and delete everything related to this package SQLite.Net-PCL

Included:
1- SQLite.Net.Async-PCL
2 -SQLite.Net.Platform.XamarinAndroidN

Only keep this package sqlite-net-pcl and its works.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.