Reputation: 468
I upgrad my Nexus 5X yesterday to test my app on the new OS and i got a messagebox saying that their is an error with sqlite. Looking on the web i found that due to a change by Google, Android N will now only permit linking to NDK-provided native libraries. libsqlite.so is not an NDK-provided native library so my app crash now.
Did someone tried to use libsqlite3_xamarin.so ? Seems to be a solution ? People are saying that we may bundle libsqlite to the app. Cann someone telle me how to achieve this through visualstudio ?
Thank you very much !
Upvotes: 1
Views: 1904
Reputation: 508
The new System.Data.dll provided by the mono team includes an embedded version of the sqlite.so nativa library name libsqlite3_xamarin.so. To include this library you just need to re-build your project. If you are using any other library that wa accessing /system/lib/libsqlite.so this will not work in Android N. Every library should embed sqlite.
Upvotes: 0
Reputation: 10895
An easy solution to this is to use the latest version of the sqlite-net-pcl package from NuGet.
The limitation in Android N is that the built in Sqlite library can only be used with the android.database.sqlite classes. Using the package from NuGet will add a version of the library to your project.
Eric sink has more details on the issue here.
Upvotes: 3