MAUI Android - System.DllNotFoundException: sqlite3 at Mono.Data.Sqlite.SQLite3.Open

Aneetha 65 Reputation points
2024-10-25T12:20:16.62+00:00

I migrated an MAUI Net 8 project from the Xamarin project. I used the Mono.Data.SQLite package for the SQLite connection. It's working fine in MAUI iOS. But in Android, it throws an exception as below,

System.DllNotFoundException: sqlite3 at Mono.Data.Sqlite.SQLite3.Open(String strFilename, SQLiteOpenFlagsEnum flags, Int32 maxPoolSize, Boolean usePool) at Mono.Data.Sqlite.SqliteConnection.Open()

Because libsqlite3.so the library is missing in MAUI Android. And I don't want to switch to another SQLite package because it leads to a major code change.

So can you please help us to resolve this issue?

Developer technologies | .NET | .NET MAUI
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.