You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Microsoft.EntityFrameworkCore.SQLite on Android 7+ not working #8922
I was successfully using Microsoft.EntityFrameworkCore.SQLite v.1.1.2 in a Xamarin.Android project. But for Android 7+, the app crashes with unauthorized access to "/system/lib64/libsqlite.so" (as reported here).
So I updated to version v2.0.0-preview1-finalas this should fix the issue.
However, this results in other problems like the following where the app compiled, but crashed while deploying/starting on the emulator:
...
06-21 09:58:18.970 D/Mono ( 3632): Assembly Loader probing location: 'System.Runtime.CompilerServices.Unsafe'.
06-21 09:58:18.970 F/monodroid-assembly( 3632): Could not load assembly 'System.Runtime.CompilerServices.Unsafe' during startup registration.
06-21 09:58:18.970 F/monodroid-assembly( 3632): This might be due to an invalid debug installation.
I then tried to add the 'System.Runtime.CompilerServices.Unsafe' NuGet package manually to my project, but it didnt fix the problem. I messed around a lot, trying different build parameters and such and actually got the app running on an Android 7 emulator. However, after a project clean and rebuild, the error showed up again.
Any help on how to get EFCore Sqlite to work on Android 7?
@tipaXamarin Updater Extension for VS 2017 (market). For older version of VS you can switch channels in vs->options->xamarin (not sure if alpha or beta).
I had the same error so I updated everything to the latest version, VS + NET Core (2.0+) + Xamarin Preview (I'm using Xamarin.Android 7.5.0.3 ), and everything is fine since then.
@erikpowa that means I am forced to use VS17 Preview in order to use Xamarin.Android 7.5, is that correct? I would probably even do that if that finally resolves that issue.
Edit: well, downloaded VS17 preview + Xamarin.Android 7.5, however they still seem to be very beta, I encounter several issues which make it impossible for me to even compile the app.
Hi, this is very serious for us, since we are already shipping the Android app with netstandard1.4.
For now just no one use a Android 7+ phone, but now we might loose many important customers if we can't get it working very soon.
Can you give me any advice on how to handle this? Is there any workaround to make it work on Android 7+?
I'd be grateful for any help. Thanks.
If you target 6.0 with your app and use EF 1.x it should work on Android 7+ as well. There is a message shown sometimes when you start, but you can just hit ok and it should be functional.
Thank you! Didn't think there was an easy solution like this (though i also added this: #7870).
For now this is the better solution anyway until we can upload UWP projects to the app store with netcore2.0 ;)
@ddobrev - Yes, thank you for that. We're converting these projects to package.config- but a few errors seem to be preventing us from deploying still...
@dfoulk you're welcome. About that error, your conversion was just fine - it's just that Xamarin.Android is notoriously poor at rebuilding. Every time a major restructuring, such as yours, takes place, the only way to properly rebuild everything is after deleting your bin/ and obj/ - that is, neither rebuild nor clean + build work in such cases.
Any news here? I cannot go back to 1.3 :( And really need EF with SQLite to work on our app in Android. How is this long delay of a fix even possible? :(
I am using it in our monodroid 8 app - it is working.. I had to convert the project to using packages.xml instead of packagereference though.. I'm waiting for this issue to be fixes so that I can convert back to packagereference and drop packages.xml again..
yes, it's the package reference scenario I want them to fix. It has been many converts back and forth already, because of other libs and I'm done spending time converting, my clients do not pay for that job :(
Activity
tipa commentedon Aug 18, 2017
Any comments/updates on this?
bricelam commentedon Aug 18, 2017
Have you tried again with EF Core version 2.0.0 and Xamarin.Android 7.5?
tipa commentedon Aug 18, 2017
How can I test it with Xamarin.Android 7.5? Version 7.4 was just released a few days ago
erikpowa commentedon Aug 19, 2017
@tipa Xamarin Updater Extension for VS 2017 (market). For older version of VS you can switch channels in vs->options->xamarin (not sure if alpha or beta).
I had the same error so I updated everything to the latest version, VS + NET Core (2.0+) + Xamarin Preview (I'm using Xamarin.Android 7.5.0.3 ), and everything is fine since then.
tipa commentedon Aug 19, 2017
@erikpowa that means I am forced to use VS17 Preview in order to use Xamarin.Android 7.5, is that correct? I would probably even do that if that finally resolves that issue.
Edit: well, downloaded VS17 preview + Xamarin.Android 7.5, however they still seem to be very beta, I encounter several issues which make it impossible for me to even compile the app.
NPadrutt commentedon Aug 22, 2017
I have the same issue on the current stable and on the preview of Xamarin. But I still have the same issue..
bricelam commentedon Aug 22, 2017
(Marking for re-triage. Xamarin supports .NET Standard 2.0 now, but this still seems to be blocked.)
groege commentedon Sep 4, 2017
Hi, this is very serious for us, since we are already shipping the Android app with netstandard1.4.
For now just no one use a Android 7+ phone, but now we might loose many important customers if we can't get it working very soon.
Can you give me any advice on how to handle this? Is there any workaround to make it work on Android 7+?
I'd be grateful for any help. Thanks.
NPadrutt commentedon Sep 4, 2017
If you target 6.0 with your app and use EF 1.x it should work on Android 7+ as well. There is a message shown sometimes when you start, but you can just hit ok and it should be functional.
groege commentedon Sep 4, 2017
Thank you! Didn't think there was an easy solution like this (though i also added this: #7870).
For now this is the better solution anyway until we can upload UWP projects to the app store with netcore2.0 ;)
30 remaining items
dfoulk commentedon Jan 19, 2018
@ddobrev - Yes, thank you for that. We're converting these projects to package.config- but a few errors seem to be preventing us from deploying still...
After following the instructions you provided in another thread:
styles.xml has apparently ran into some issues as a result :(
Update:
Something was wrong with our initial conversion. We reverted and tried again and all ended up okay... Thanks again!
ddobrev commentedon Jan 20, 2018
@dfoulk you're welcome. About that error, your conversion was just fine - it's just that Xamarin.Android is notoriously poor at rebuilding. Every time a major restructuring, such as yours, takes place, the only way to properly rebuild everything is after deleting your bin/ and obj/ - that is, neither rebuild nor clean + build work in such cases.
jnormen commentedon Feb 2, 2018
Any news here? I cannot go back to 1.3 :( And really need EF with SQLite to work on our app in Android. How is this long delay of a fix even possible? :(
dazinator commentedon Feb 2, 2018
I am using it in our monodroid 8 app - it is working.. I had to convert the project to using packages.xml instead of packagereference though.. I'm waiting for this issue to be fixes so that I can convert back to packagereference and drop packages.xml again..
jnormen commentedon Feb 2, 2018
yes, it's the package reference scenario I want them to fix. It has been many converts back and forth already, because of other libs and I'm done spending time converting, my clients do not pay for that job :(
divega commentedon Feb 5, 2018
Clearing milestone to decide in triage whether we want to keep this for tracking purposes or whether we should close.
The underlying issues in Xamarin Android are now tracked in dotnet/android#1154 and dotnet/android#1196.
dfoulk commentedon Feb 5, 2018
Thanks for the update @divega