Android N sqlite-net-pcl issue

We started supporting Android N recently and everytime the app boots up we are getting the following dialog:

"Detected problems with app native libraries(please consult log for details): libmonosgen-32bit-2.0.so: unauthorized access to "/system/lib/libsqlite.so""

I have researched the issue and the general consensus was to update the sqlite plugins so that they use the Android approved way of accessing sqlite.

In my Android project I have the following references:
Sqlite-net 1.4.118
SqlitePCLRaw.batteries_green 1.1.8
SqlitePCLRaw.batteries_v2 1.1.8
SqlitePCLRaw.core 1.1.8
SqlitePCLRaw.lib.e_sqlite3 1.1.8
SqlitePCLRaw.provider.e_sqlite3 1.1.8
Microsoft.Data.Sqlite 1.1.1

In a second project I have the following references:
Sqlite-net-pcl 1.4.118
Microsoft.Data.Sqlite 1.1.1

Any ideas on the best way to get around this?

Best Answer

  • RyanFrenchRyanFrench US ✭✭
    Accepted Answer

    UPDATE

    We found a solution in case anyone has this same issue. Update to netstandard2.0, then update Microsoft.Data.Sqlite to v2.0

    This will pull in an updated SQLitePCL.raw which will use the Xamarin supplied libsqlite_xamarin.so library. Basically Microsoft is now supplying libsqlite.so so we don't have to.

Answers

  • RyanFrenchRyanFrench USMember ✭✭
    edited October 2017

    Just as an update, another guy on my team included a second instance of "libsqlite.so". This seems to "work" in release mode but debug mode still catches the exception. I'm hoping there is a better way than having 2 "libsqlite.so" bundled with our app (as this seems very bad).

  • RyanFrenchRyanFrench USMember ✭✭
    Accepted Answer

    UPDATE

    We found a solution in case anyone has this same issue. Update to netstandard2.0, then update Microsoft.Data.Sqlite to v2.0

    This will pull in an updated SQLitePCL.raw which will use the Xamarin supplied libsqlite_xamarin.so library. Basically Microsoft is now supplying libsqlite.so so we don't have to.

Sign In or Register to comment.