locked
Android - libmonosgen library sqlite problems with app native libraries RRS feed

  • Question

  • User220248 posted

    Hello,

    I have this issue since 2 days ago:

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

    This error splash at the run of app, I have cleaned and rebuilded entire solution a lot of times, and I have reinstalled Mono.Data.Sqlite reference, and nothing has worked, the app continues runing when the error is closed.

    Any suggestion??

    Thanks.

    Tuesday, September 20, 2016 10:54 AM

All replies

  • User220248 posted

    I found more information in the log: library "/system/lib64/libsqlite.so" ("/system/lib64/libsqlite.so") needed or dlopened by "/data/app/Mono.Android.DebugRuntime-1/lib/arm64/libmomosgen-64bit-2.0.so" is not accessible for the namespace "classloader-namespace" - the access is temporarily granted as a workaround for http://b/26394120, note that the access will be removed in future releases of Android.

    this has begun to fail now, after months working.

    Thanks.

    Tuesday, September 20, 2016 4:08 PM
  • User192404 posted

    We are facing the same issue. App works fine but error message is shown every time app is launched.

    Tuesday, September 20, 2016 10:13 PM
  • User220248 posted

    There is no solution? is a company project was almost finished and has appeared error near the end of development, these things are what make companies wary of Xamarin, if my company is not solved will never use this technology.

    Thursday, September 22, 2016 10:52 AM
  • User180901 posted

    Same here. Maybe something to do with Android 7.0 as the error only pops up on a recently updated device.

    Thursday, September 22, 2016 11:52 AM
  • User774 posted

    It has nothing to do with Xamarin. In Android 7.0, the low-level Sqlite binary can no longer be used by apps. If you use one of the portable Sqlite libraries for .NET (like sqlite-net or Iridium), you will get the warning. Most libraries will be updated to use the "Android-approved" way of accessing Sqlite on the device.

    Thursday, September 22, 2016 1:13 PM
  • User220248 posted

    Thanks for the answer, I could do a test with a tablet whose version is less than 7.0 Nougat, and confirm that the error is produced by the latest version of Android. I hope to solve it soon.

    Thursday, September 22, 2016 3:12 PM
  • User43076 posted

    same problem

    Tuesday, September 27, 2016 12:02 PM
  • User160415 posted

    same here, tested with API 21 and API 23 works fine, for API 24 (Android 7.0) I got this pops every start-up of the app

    Tuesday, September 27, 2016 1:26 PM
  • User49353 posted

    It is definitely a Xamarin problem because the Xamarin component Sqlite.Net 1.0.11 published by Xamarin Inc. does not work with Android 7. It throws the original error above So what's the solution Xamarin?

    Wednesday, September 28, 2016 12:10 AM
  • User160415 posted

    I solved the problem. In my case I updated the sql library in use and the pop-up is disappeared.

    First I deleted the libraries from 'Manage NuGet Packages for Solutions...' - library 'sqlite-net-pcl' and the connected one 'SQLitePCL.raw'. Then I installed the new version of through the PackageManager Console, in my case the command was 'Install-Package sqlite-net-pcl'. Now the versions are 'sqlite-net-pcl' --> 1.2.0 | 'SQLitePCL.raw' --> 1.0.1. Also it downloaded others dependencies like SQLitePCLRaw.bundle_green. I hope this will help someone else.

    Tested in two different projects.

    Wednesday, September 28, 2016 7:49 AM
  • User92610 posted

    Thank you Multiprotexion. I had a crash on start from this in 7.0. replacing remove SQLite.Net-pcl and SQLite.Net.Core-pcl and replacing with sqlite-net-pcl 1.2.0

    Wednesday, September 28, 2016 11:41 PM
  • User220248 posted

    Thanks Multiprotexion, it worked.

    Thursday, September 29, 2016 2:40 PM
  • User48792 posted

    I'm using Akavache, which is dependent on SQLitePCL.raw_basic. I've updated other SQLite libraries, but this one doesn't have an update available. Do you guys know of a workaround for this?

    Friday, October 7, 2016 1:08 PM
  • User236299 posted

    @snotyak, You can upgrade to the test version of Akavache 5 where this issue has been resolved. You'll have to use the MyGet package feed (https://www.myget.org/F/akavache/api/v3/index.json).

    References: https://github.com/akavache/Akavache/issues/306 https://github.com/akavache/Akavache/pull/291#issuecomment-253601110 https://blog.xamarin.com/preparing-for-native-library-linking-changes-in-android-n/

    Thursday, October 27, 2016 7:32 PM
  • User135846 posted

    @TaylorBuchanan Thank you for updating the library but we previously accessed the SQLiteAsyncConnection from Akavache.Sqlite3.Internal which I see is no longer accessible. This was vital for us to provide the seamless use of the library.

    Reading the documentation from Android - is there some steps we can do to allow us to use this object? Can Akavache expose this or can you provide us with the steps necessary to continue using this?

    Any assistance is greatly appreciated.

    Thursday, December 1, 2016 11:22 AM
  • User236299 posted

    @MarketAlly I'm not a developer for the library, so I didn't update it. However, I imagine the class you are looking for isn't accessible any longer because it was within the "Internal" namespace. Here's a reply from Akavache: https://github.com/akavache/Akavache/issues/330

    Monday, December 5, 2016 2:12 PM
  • User393 posted

    @Multiprotexion said: I solved the problem. In my case I updated the sql library in use and the pop-up is disappeared.

    First I deleted the libraries from 'Manage NuGet Packages for Solutions...' - library 'sqlite-net-pcl' and the connected one 'SQLitePCL.raw'. Then I installed the new version of through the PackageManager Console, in my case the command was 'Install-Package sqlite-net-pcl'. Now the versions are 'sqlite-net-pcl' --> 1.2.0 | 'SQLitePCL.raw' --> 1.0.1. Also it downloaded others dependencies like SQLitePCLRaw.bundle_green. I hope this will help someone else.

    Tested in two different projects.

    I'm using the SQLite.NET Extensions and it requires the sqlite-net-pcl package. Any clue how to get around that?

    Wednesday, December 7, 2016 5:29 PM
  • User393 posted

    @Multiprotexion Nevermind... Just found out there is an Alpha version which references sql-lite-net instead of the other package. Exceptions seem to have disappeared.

    Wednesday, December 7, 2016 6:27 PM
  • User282517 posted

    I'm having the same problem when I launch my Android application (version 7.0) :

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

    I updated the packages I'm using for Android except for Xamarin.Android.Support which I can't update because of dependencies :

    <?xml version="1.0" encoding="utf-8"?>
    <packages>
      <package id="CommonServiceLocator" version="1.3" targetFramework="monoandroid60" />
      <package id="ExifLib" version="1.7.0.0" targetFramework="monoandroid60" />
      <package id="ExifLib.PCL" version="1.0.2-pre01" targetFramework="monoandroid70" />
      <package id="HockeySDK.Xamarin" version="4.1.0" targetFramework="monoandroid70" />
      <package id="MvvmLightLibs" version="5.3.0.0" targetFramework="monoandroid60" />
      <package id="SharpZipLib" version="0.86.0" targetFramework="monoandroid60" />
      <package id="sqlite-net-pcl" version="1.2.1" targetFramework="monoandroid70" />
      <package id="SQLitePCLRaw.bundle_green" version="1.1.1" targetFramework="monoandroid70" />
      <package id="SQLitePCLRaw.core" version="1.1.1" targetFramework="monoandroid70" />
      <package id="SQLitePCLRaw.lib.e_sqlite3.android" version="1.1.1" targetFramework="monoandroid70" />
      <package id="SQLitePCLRaw.provider.e_sqlite3.android" version="1.1.1" targetFramework="monoandroid70" />
      <package id="Xam.Plugin.Connectivity" version="2.2.12" targetFramework="monoandroid60" />
      <package id="Xam.Plugin.DeviceInfo" version="2.0.2" targetFramework="monoandroid60" />
      <package id="Xam.Plugins.Forms.DeviceOrientation" version="1.0.1" targetFramework="monoandroid60" />
      <package id="Xamarin.Android.Support.Animated.Vector.Drawable" version="23.3.0" targetFramework="monoandroid60" />
      <package id="Xamarin.Android.Support.Design" version="23.3.0" targetFramework="monoandroid60" />
      <package id="Xamarin.Android.Support.v4" version="23.3.0" targetFramework="monoandroid60" />
      <package id="Xamarin.Android.Support.v7.AppCompat" version="23.3.0" targetFramework="monoandroid60" />
      <package id="Xamarin.Android.Support.v7.CardView" version="23.3.0" targetFramework="monoandroid60" />
      <package id="Xamarin.Android.Support.v7.MediaRouter" version="23.3.0" targetFramework="monoandroid60" />
      <package id="Xamarin.Android.Support.v7.RecyclerView" version="23.3.0" targetFramework="monoandroid60" />
      <package id="Xamarin.Android.Support.Vector.Drawable" version="23.3.0" targetFramework="monoandroid60" />
      <package id="Xamarin.Forms" version="2.3.3.175" targetFramework="monoandroid70" />
      <package id="XLabs.Core" version="2.3.0-pre05" targetFramework="monoandroid60" />
      <package id="XLabs.Forms" version="2.3.0-pre05" targetFramework="monoandroid60" />
      <package id="XLabs.IoC" version="2.3.0-pre05" targetFramework="monoandroid60" />
      <package id="XLabs.Platform" version="2.3.0-pre05" targetFramework="monoandroid60" />
      <package id="XLabs.Serialization" version="2.3.0-pre05" targetFramework="monoandroid60" />
    </packages>
    

    I followed your advice and updated sqlite-net-pcl but with no luck. I saw on another post that Xamarin.Android.Support doesn't have to be updated if Xamarin.Forms is : https://forums.xamarin.com/discussion/57283/unable-to-find-a-version-of-xf-compatible-with

    I don't really know how to go from here, if there is a package that doesn't handle the latest framework or if there could be another reason for the exception. Do you know if there is a solution for this ?

    Thanks

    Thursday, December 8, 2016 3:20 PM
  • User137466 posted

    @mindVersus Any luck?

    I also followed the advice and updated sqlite-net-pcl but still can't get rid of this runtime error message. I even removed all sqlite references and re-added/updated everything. Still the same issue. Am I missing something?

    Package we were using:

    <package id="SQLite.Net.Core-PCL" version="3.1.1" targetFramework="MonoAndroid60" />

    I've removed that one and added sqlite-net-pcl version 1.2.0 - no luck. Went ahead and upgraded to the latest version which was released this month (January 2017) with no luck.

    Mono.Data.Sqlite wasn't included in our References but I went ahead and added it but no luck there either.

    Here's the current package config file.

        <?xml version="1.0" encoding="utf-8"?>
        <packages>
          <package id="KeyChain.Net" version="0.0.4" targetFramework="MonoAndroid60" />
          <package id="Microsoft.NETCore.Platforms" version="1.1.0" targetFramework="monoandroid70" />
          <package id="Microsoft.Win32.Primitives" version="4.3.0" targetFramework="monoandroid70" />
          <package id="NETStandard.Library" version="1.6.1" targetFramework="monoandroid70" />
          <package id="Newtonsoft.Json" version="9.0.1" targetFramework="monoandroid60" />
          <package id="PhotoView.Android" version="1.0.0" targetFramework="MonoAndroid60" />
          <package id="RecyclerViewAnimators" version="2.1.0.0" targetFramework="MonoAndroid60" />
          <package id="RestSharp" version="105.2.3" targetFramework="MonoAndroid60" />
    **      
          <package id="sqlite-net-pcl" version="1.2.0" targetFramework="monoandroid70" />
          <package id="SQLitePCLRaw.bundle_green" version="1.1.2" targetFramework="monoandroid70" />
          <package id="SQLitePCLRaw.core" version="1.1.2" targetFramework="monoandroid70" />
          <package id="SQLitePCLRaw.lib.e_sqlite3.android" version="1.1.2" targetFramework="monoandroid70" />
          <package id="SQLitePCLRaw.provider.e_sqlite3.android" version="1.1.2" targetFramework="monoandroid70" />
    **
          <package id="Square.OkHttp" version="2.7.5.0" targetFramework="MonoAndroid60" />
          <package id="Square.OkIO" version="1.11.0" targetFramework="monoandroid70" />
          <package id="Square.Picasso" version="2.5.2.1" targetFramework="MonoAndroid60" />
          <package id="System.AppContext" version="4.3.0" targetFramework="monoandroid70" />
          <package id="System.Collections" version="4.3.0" targetFramework="monoandroid70" />
          <package id="System.Collections.Concurrent" version="4.3.0" targetFramework="monoandroid70" />
          <package id="System.Console" version="4.3.0" targetFramework="monoandroid70" />
          <package id="System.Diagnostics.Debug" version="4.3.0" targetFramework="monoandroid70" />
          <package id="System.Diagnostics.Tools" version="4.3.0" targetFramework="monoandroid70" />
          <package id="System.Diagnostics.Tracing" version="4.3.0" targetFramework="monoandroid70" />
          <package id="System.Globalization" version="4.3.0" targetFramework="monoandroid70" />
          <package id="System.Globalization.Calendars" version="4.3.0" targetFramework="monoandroid70" />
          <package id="System.IO" version="4.3.0" targetFramework="monoandroid70" />
          <package id="System.IO.Compression" version="4.3.0" targetFramework="monoandroid70" />
          <package id="System.IO.Compression.ZipFile" version="4.3.0" targetFramework="monoandroid70" />
          <package id="System.IO.FileSystem" version="4.3.0" targetFramework="monoandroid70" />
          <package id="System.IO.FileSystem.Primitives" version="4.3.0" targetFramework="monoandroid70" />
          <package id="System.Linq" version="4.3.0" targetFramework="monoandroid70" />
          <package id="System.Linq.Expressions" version="4.3.0" targetFramework="monoandroid70" />
          <package id="System.Net.Http" version="4.3.0" targetFramework="monoandroid70" />
          <package id="System.Net.Primitives" version="4.3.0" targetFramework="monoandroid70" />
          <package id="System.Net.Sockets" version="4.3.0" targetFramework="monoandroid70" />
          <package id="System.ObjectModel" version="4.3.0" targetFramework="monoandroid70" />
          <package id="System.Reflection" version="4.3.0" targetFramework="monoandroid70" />
          <package id="System.Reflection.Extensions" version="4.3.0" targetFramework="monoandroid70" />
          <package id="System.Reflection.Primitives" version="4.3.0" targetFramework="monoandroid70" />
          <package id="System.Resources.ResourceManager" version="4.3.0" targetFramework="monoandroid70" />
          <package id="System.Runtime" version="4.3.0" targetFramework="monoandroid70" />
          <package id="System.Runtime.Extensions" version="4.3.0" targetFramework="monoandroid70" />
          <package id="System.Runtime.Handles" version="4.3.0" targetFramework="monoandroid70" />
          <package id="System.Runtime.InteropServices" version="4.3.0" targetFramework="monoandroid70" />
          <package id="System.Runtime.InteropServices.RuntimeInformation" version="4.3.0" targetFramework="monoandroid70" />
          <package id="System.Runtime.Numerics" version="4.3.0" targetFramework="monoandroid70" />
          <package id="System.Security.Cryptography.Algorithms" version="4.3.0" targetFramework="monoandroid70" />
          <package id="System.Security.Cryptography.Encoding" version="4.3.0" targetFramework="monoandroid70" />
          <package id="System.Security.Cryptography.Primitives" version="4.3.0" targetFramework="monoandroid70" />
          <package id="System.Security.Cryptography.X509Certificates" version="4.3.0" targetFramework="monoandroid70" />
          <package id="System.Text.Encoding" version="4.3.0" targetFramework="monoandroid70" />
          <package id="System.Text.Encoding.Extensions" version="4.3.0" targetFramework="monoandroid70" />
          <package id="System.Text.RegularExpressions" version="4.3.0" targetFramework="monoandroid70" />
          <package id="System.Threading" version="4.3.0" targetFramework="monoandroid70" />
          <package id="System.Threading.Tasks" version="4.3.0" targetFramework="monoandroid70" />
          <package id="System.Threading.Timer" version="4.3.0" targetFramework="monoandroid70" />
          <package id="System.Xml.ReaderWriter" version="4.3.0" targetFramework="monoandroid70" />
          <package id="System.Xml.XDocument" version="4.3.0" targetFramework="monoandroid70" />
          <package id="Xamarin.Android.Support.Animated.Vector.Drawable" version="24.2.1" targetFramework="monoandroid70" />
          <package id="Xamarin.Android.Support.Compat" version="24.2.1" targetFramework="monoandroid70" />
          <package id="Xamarin.Android.Support.Core.UI" version="24.2.1" targetFramework="monoandroid70" />
          <package id="Xamarin.Android.Support.Core.Utils" version="24.2.1" targetFramework="monoandroid70" />
          <package id="Xamarin.Android.Support.Design" version="24.2.1" targetFramework="monoandroid70" />
          <package id="Xamarin.Android.Support.Fragment" version="24.2.1" targetFramework="monoandroid70" />
          <package id="Xamarin.Android.Support.Media.Compat" version="24.2.1" targetFramework="monoandroid70" />
          <package id="Xamarin.Android.Support.v4" version="24.2.1" targetFramework="monoandroid70" />
          <package id="Xamarin.Android.Support.v7.AppCompat" version="24.2.1" targetFramework="monoandroid70" />
          <package id="Xamarin.Android.Support.v7.CardView" version="24.2.1" targetFramework="monoandroid70" />
          <package id="Xamarin.Android.Support.v7.RecyclerView" version="24.2.1" targetFramework="monoandroid70" />
          <package id="Xamarin.Android.Support.Vector.Drawable" version="24.2.1" targetFramework="monoandroid70" />
          <package id="Xamarin.GooglePlayServices.Base" version="29.0.0.2" targetFramework="monoandroid60" />
          <package id="Xamarin.GooglePlayServices.Basement" version="29.0.0.2" targetFramework="monoandroid60" />
          <package id="Xamarin.GooglePlayServices.Gcm" version="29.0.0.2" targetFramework="monoandroid60" />
          <package id="Xamarin.GooglePlayServices.Measurement" version="29.0.0.2" targetFramework="monoandroid60" />
          <package id="Xamarin.Insights" version="1.12.3" targetFramework="MonoAndroid60" />
        </packages>
    

    I'm supposed to push this app to production soon so if anyone could take some time out of their day to help out that would be greatly appreciated!

    Thursday, January 19, 2017 7:50 PM
  • User264394 posted

    I solved this problem using this package https://www.nuget.org/packages/SQLite.Net.Platform.XamarinAndroidN

    Just replace all your "SQLitePlatformAndroid" objects with "SQLitePlatformAndroidN" instead, and don't forget to reference the latest Mono.Data.Sqlite in your Android project

    Friday, January 27, 2017 4:21 PM
  • User239876 posted

    Thank's for solution @LuisNascimento

    Friday, January 27, 2017 4:27 PM
  • User40225 posted

    Thanks @LuisNascimento.

    Additional important information: The documentation of Sqlite.Net.Platform.XamarinAndroidN says the we must reference Mono.Data.Sqlite.

    I resolved this by referencing latest Mono.Data.Sqlite. The trick is that you need to reference System.Data.Sqlite assembly which is actually Mono.Data.Sqlite. It will show as Mono.Data.Sqlite in Visual Studio.

    Wednesday, February 22, 2017 6:26 AM
  • User298376 posted

    Thank you @Multiprotexion, is working.

    Monday, February 27, 2017 5:28 PM
  • User280792 posted

    Thanks @LuisNascimento and @GautamJain

    Thursday, March 16, 2017 10:01 AM
  • User310674 posted

    Guys! I'm Facing the same problem but I'm using EntityFramework Core which its setup is demonstrate here (http://www.jon-douglas.com/2016/12/28/xamarin-android-entity-framework/) now how am I supposed to fix this?! I saw some solutions here but the difference is that I can't change the EF Core codes!

    Tuesday, March 21, 2017 10:34 AM
  • User239635 posted

    @Multiprotexion said: I solved the problem. In my case I updated the sql library in use and the pop-up is disappeared.

    First I deleted the libraries from 'Manage NuGet Packages for Solutions...' - library 'sqlite-net-pcl' and the connected one 'SQLitePCL.raw'. Then I installed the new version of through the PackageManager Console, in my case the command was 'Install-Package sqlite-net-pcl'. Now the versions are 'sqlite-net-pcl' --> 1.2.0 | 'SQLitePCL.raw' --> 1.0.1. Also it downloaded others dependencies like SQLitePCLRaw.bundle_green. I hope this will help someone else.

    Tested in two different projects.

    thank you! This fixed my Android SQLite pop-up ! I understood that your suggestion is to remove these packages:

    SQLite.Net-PCL SQLite.Net.Async-PCL SQLite.Net.Core-PC

    and install this one instead: sqlite-net-pcl (I have version 1.3.1 which is latest right now)

    Which I did, and for some reason Nuget package manager in my VS2015 downloaded the following additional 39 packages perhaps they are required by sqlite-net-pcl). these are now sitting under my iOS and Android projects.

    System.AppContext System.Collections System.Collections.Concurrent System.Console System.Diagnostics.Debug System.Diagnostics.Tools System.Diagnostics.Tracing System.Globalization System.Globalization.Calendars System.IO System.IO.Compression System.IO.Compression.ZipFile System.IO.FileSystem System.IO.FileSystem.Primitives System.Linq System.Linq.Expressions System.Net.Http System.Net.Primitives System.Net.Sockets System.ObjectModel System.Reflection System.Reflection.Extensions System.Reflection.Primitives System.Resources.ResourceManager System.Runtime System.Runtime.Extensions System.Runtime.Handles System.Runtime.InteropServices System.Runtime.InteropServices.RuntimeInformation System.Runtime.Numerics System.Security.Cryptography.Algorithms System.Security.Cryptography.Encoding System.Security.Cryptography.Primitives System.Security.Cryptography.X509Certificates System.Text.Encoding System.Text.Encoding.Extensions System.Text.RegularExpressions System.Threading System.Threading.Tasks System.Threading.Timer System.Xml.ReaderWriter System.Xml.XDocument

    Saturday, April 15, 2017 2:13 AM
  • User89693 posted

    Thanks @LuisNascimento !

    Thursday, April 27, 2017 9:51 PM
  • User302481 posted

    @LuisNascimento thanks!!!

    Monday, May 15, 2017 9:56 AM
  • User341723 posted

    @LuisNascimento where exactly should i reference the latest version of Mono.Data.Sqlite in my Android project. Clearly I'm missing something obvious.

    Friday, August 25, 2017 8:17 AM
  • User348873 posted

    I resolved this issue by removing SQLite.Net-PCL and its dependencies. then i added SQLite.Net.Platform.XamarinAndroidN packege from nuget packages, after that added Mono.Data.Sqlite latest version to .Android Project from nuget. Remember: Wherever you have used SQLitePlatformAndroid object in android project, change it to SQLitePlatformAndroidN.

    Tuesday, September 19, 2017 1:06 PM
  • User257229 posted

    @Multiprotexion thank you for your solution it's work for me I have other problem, when release my project and install apk on device, when use sqlite (crud operation) app is force closed! If there is no problem with the cable to connect the device to the computer and use it to debug the program! Do you know what the cause of this problem?

    Wednesday, December 27, 2017 9:10 PM
  • User160415 posted

    @HadiSalehy hi, I have no clue about the cause of the problem, I'm sorry, even if it's connected with the SQLite! Is more than a year since I'm using Xamarin just for updating some code for our old app; in the meantime we passed to use NativeScript.

    Friday, December 29, 2017 11:26 AM
  • User364864 posted

    @Parag_Joshi said: We are facing the same issue. App works fine but error message is shown every time app is launched.

    I've just run into the same issue.

    Bought a new phone running on Android 7.1 (previous phone was on 4.0 or 5.0 I think). Now this error is showing every time the app starts up.

    App still works 100% fine though

    I can't get the solutions given in this thread to work either.

    When I try the solution from @Multiprotexion I see two important-looking errors thrown in the log:

    Failed to load assembly SQLite-net[0x7f76efc980].
    
    The type initializer for 'SQLite.SQLiteConnection' threw an exception.
    

    and then the app never makes it past an unwanted white screen.

    When I try @LuisNascimento's solution, the install of the XamaroidAndroidN NuGet package fails with the following:

    Package SQLite.Net.Platform.XamarinAndroidN 3.1.1 is not compatible with monoandroid80 (MonoAndroid,Version=v8.0). Package SQLite.Net.Platform.XamarinAndroidN 3.1.1 supports: net (.NETFramework,Version=v0.0)

    Of the two options, I prefer the second choice. It seems like it has more potential for an easy route to success. Anybody got any pointers for what I'm supposed to do here?

    Thanks.

    Sunday, February 11, 2018 12:13 PM
  • User226269 posted

    @stuart_A said:

    @Parag_Joshi said: We are facing the same issue. App works fine but error message is shown every time app is launched.

    I've just run into the same issue.

    Bought a new phone running on Android 7.1 (previous phone was on 4.0 or 5.0 I think). Now this error is showing every time the app starts up.

    App still works 100% fine though

    I can't get the solutions given in this thread to work either.

    When I try the solution from @Multiprotexion I see two important-looking errors thrown in the log:

    Failed to load assembly SQLite-net[0x7f76efc980].
    
    The type initializer for 'SQLite.SQLiteConnection' threw an exception.
    

    and then the app never makes it past an unwanted white screen.

    When I try @LuisNascimento's solution, the install of the XamaroidAndroidN NuGet package fails with the following:

    Package SQLite.Net.Platform.XamarinAndroidN 3.1.1 is not compatible with monoandroid80 (MonoAndroid,Version=v8.0). Package SQLite.Net.Platform.XamarinAndroidN 3.1.1 supports: net (.NETFramework,Version=v0.0)

    Of the two options, I prefer the second choice. It seems like it has more potential for an easy route to success. Anybody got any pointers for what I'm supposed to do here?

    Thanks.

    Please any solution for this i can not install SQLite.Net.Platform.XamarinAndroidN 3.1.1 (restored failed)

    10 days and no solutions

    Sunday, April 8, 2018 10:50 AM
  • User364864 posted

    @"samialfarra.3414" said:

    Please any solution for this i can not install SQLite.Net.Platform.XamarinAndroidN 3.1.1 (restored failed)

    10 days and no solutions

    I'll tell you what I did - I did nothing! And it worked! I'll explain.

    I eventually gave up and decided to just accept that the app wouldn't work on the latest version of Android.

    So I stayed with the standard version of SQLite, and of course it always showed the error message when the app first opened.

    Then eventually I finished the app and prepared it for publishing in Release mode.

    The Release mode version had no problems!!!!!!

    So, try testing the app on Release mode. See what happens.

    If that doesn't work, try fully building the app and creating an APK via the archive manager, then manually install it on your phone.

    This worked for me, and now the app works without any errors. I've used the standard SQLite package, and somehow it's working totally fine on all versions of Android, in Release mode.

    Monday, April 9, 2018 2:28 AM
  • User230417 posted

    @LuisNascimento said: I solved this problem using this package https://www.nuget.org/packages/SQLite.Net.Platform.XamarinAndroidN

    Just replace all your "SQLitePlatformAndroid" objects with "SQLitePlatformAndroidN" instead, and don't forget to reference the latest Mono.Data.Sqlite in your Android project

    i am trying to install but without sucess! Show this erros:

    Package SQLite.Net.Platform.XamarinAndroidN 3.1.1 is not compatible with monoandroid81 (MonoAndroid,Version=v8.1). Package SQLite.Net.Platform.XamarinAndroidN 3.1.1 supports: net (.NETFramework,Version=v0.0)

    Friday, May 25, 2018 1:34 PM
  • User252718 posted

    @stuart_A Thanks a lot. I am not getting the warning pop-up when running the code in Release mode. So I can simply ignore the warning in debug mode (during development).

    Sunday, November 11, 2018 6:15 AM