Open alexvinidiktov opened 8 years ago
Yep this is a very important update that's required. For reference, the repo this library forked from (praeclarum/sqlite-net) has already made the changes required: https://github.com/praeclarum/sqlite-net/commits/master
Indeed, this seems like a big problem. So the solution would be to use SQLitePCL.raw/SQLitePCL.bundle_green/
Thanks for the info. Do we have to wait for an updated Nuget package? Or can we just add the SQLitePCL.raw/SQLitePCL.bundle_green/ Nuget packages to our solution and it will just work?
Do the SQLitePCL packages replace the packages? Or is this going to be updated for Nougat?
Hi any news on this issue? I updated my Xamarin today (beta channel) and now I can't start the apps with SQLite anymore...
Any workaround for the time being other then reverting back to the older Xamarin versions?
Same issue here. For now I downgraded back to the Xamarin release channel, but I think this will soon become a problem for lots of people once the beta goes to release.
I just tested my Xamarin Forms app on Android 7.0 that uses: SQLite.Net-PCL SQLite.Net.Core-PCL SQLite.Net.Async-PCL
And it just works :)
It does not work with the current Xamarin Android beta. Release is OK.
I've switched the SQLite calls from the system SQLite to ericsink's Bundle_green embedded SQLite on my own fork of this project.
https://github.com/Machinarius/SQLite.Net-PCL https://www.nuget.org/packages/SQLite.Net-PCL-Green/3.1.1-AndroidN
Most tests pass and my app is behaving nicely with no warnings whatsoever regarding library usage on an Android Nougat emulator since i started using my fork instead of Oysten's nuget package.
Do handle with care and test your app thoroughly as i can NOT guarantee this simple string substitution trick will just work on all cases, mostly because the system SQLite library may be compiled with different flags. Also, the Nuget package was compiled using Oysten's master branch that may contain experimental code. DO TEST YOUR APP ON ANDROID N AND BELOW. DO IT. DON'T SKIP THIS STEP. PRETTY PLEASE DO NOT SKIP IT. YOU HAVE BEEN WARNED.
As I understand, libsqlite.so will be:
https://developer.android.com/about/versions/nougat/android-7.0-changes.html
Is there any update about this issue? @oysteinkrog are you planning to update the package to be compliant with Android N and future releases?
@admaiorastudio That's right. That is also discussed in the urls of the first post and here: http://android-developers.blogspot.nl/2016/06/improving-stability-with-private-cc.html
As @oysteinkrog didn't update this library since november 2015 I'll go look for another library, for example @Machinarius version.
any updates on this? @oysteinkrog ?
@Machinarius I tried to get your version working but I was unsuccessful. Do you have any pointers? Ie: what nuget packages to remove, if any, for yours to work? Any nuget packages I need to add extra? Any extra init() that has to happen like Batteries.init()? Any namespace changes? Thanks
Switched over to sqlite-net-pcl and everything is working great. Had to change my connection code, but sqlite-net-pcl
is actually a lot more simple to get a connection with.
Only issue I found is the there is no DeleteAllAsync()
but that is not such a big deal for me.
Any news on this issue? @oysteinkrog
we switched to sqlite-net-pcl.
So is the solution - if we want our application to work on Android 7+ we need to swap to sqlite-net-pcl?
As long as this fork is not updated to also use SQLitePCLRaw: yes
@MKuckert What about Sqlite.Net-Extensions? (Which I notice you are an owner of).
The Nuget has a dependency on Sqlite.Net-PCL. So if I use the Extensions nuget I am stuck on this version so cant run my application on Android 7+. Is that correct?
Actually scratch that, I notice you have swapped over in the Alpha releases
@michaeldimoudis I just tested my Xamarin Forms app on Android 7.0 that uses: SQLite.Net-PCL SQLite.Net.Core-PCL SQLite.Net.Async-PCL
And it just works :)
Tremendous solution and saved my day... Thanks...
Now it stopped working :(
May be it just works because Android N is not denying access to the libsqlite.so - contrary to their beta versions. You should see some log messages pointing that out.
Keep in mind that Android M will deny access to the native libraries, so although things might look to work for now they will break.
Any new fix or workaround on this issue?
https://developer.xamarin.com/releases/android/xamarin.android_6/xamarin.android_6.1/#mono-data-sqlite
Eric Sink also wrote about this: https://github.com/ericsink/SQLitePCL.raw/wiki/SQLite-net-and-Android-N