Stable Release: Xamarin 4, Cycle 6 – Service Release 4

BrendanZagaeskiBrendanZagaeski USForum Administrator, Xamarin Team Xamurai
edited May 2016 in General

Release info

Please see https://releases.xamarin.com/stable-release-cycle-6-service-release-4/ for the details about this release.

Bug reports and questions

As always, be sure to search briefly through the Release Blog post, release notes, documentation, and previous bug reports for any existing answers. After that, choose the appropriate next step:

  • File a bug using the new bug form if you have found an issue that only happens on Cycle 6 – Service Release 4 (or if you have found an issue that you otherwise suspect is a bug).

  • Post a question on Stack Overflow if you have hit an issue and are not yet sure if it is a bug, or if you have a follow-up question about a new feature beyond what is covered in the documentation and release notes.

  • Post a reply directly in this forum discussion if you have a follow-up question or comment about this release that is not suitable for a bug report or Stack Overflow such as "What is in this release?", "When...?", or "Where...?"

(This "bug reports and questions" section is new compared to previous forum release announcements. It is based on the list of recommendations from https://blog.xamarin.com/contest-get-answering-on-stack-overflow/.)

Installing the new version or switching back to the previous version

You can install this new Stable version using the updater.

You can downgrade back to the previous Stable version by manually reinstalling each old package. See the KB article on downgrading. If you would prefer an email with any older installer links you need, feel free to write to [email protected] to request the older versions.

Older Mono package versions are not currently listed on https://store.xamarin.com/account/my/subscription/downloads. The Mono package for the previous Stable version is available here:

Additional release information

You can view the list of bugs addressed by this service release with the following Bugzilla query:

  • Cycle 6 – Service Release 4 FIXED bugs

    (Note that the bug numbers in this query include some non-public bugs. The non-public bugs were tracking the breakage of Mono.Data.Sqlite on Android N (that is now fixed).)

Posts

  • BradChase.2654BradChase.2654 USMember ✭✭✭
    edited May 2016

    Is that the Alpha 4.2.0.21? Or is it not in the channel yet?

    NM I justed figured it out it is! YESSS! Finally WCF is working!! Thanks all!

  • BrendanZagaeskiBrendanZagaeski USForum Administrator, Xamarin Team Xamurai

    You can check the Release Blog post for the per-product version number details. For example, the new Xamarin for Visual Studio build is showing up for me as expected on the Stable channel in the updater:


    image


    Note that this "Service Release 4" is a bit unusual because it is a "direct to Stable" release that didn't go through the Alpha or Beta channels (similar to a hotfix release). This was possible because the release contains a tightly constrained set of patches. It was also necessary at the moment due to the unusual circumstance of having 2 different new feature versions (Cycle 7 and Cycle 8) occupying the Beta and Alpha channels.

  • MoHbkMoHbk USMember

    I install Xamarin from original Visual Studio Installer (2015 update 2) not from Xamarin Installer.
    Can I use this updater for my version?

  • mario.moramario.mora USMember ✭✭

    Hi
    after updating this morning, my two PCL projects fail to load with this error:

    "Could not load project 'XXXX' with unknown item type {XXXXXXX...}"

    What now?

  • mario.moramario.mora USMember ✭✭

    Finally the error disappears after rebooting, cleaning and so... :smile:

  • BradChase.2654BradChase.2654 USMember ✭✭✭

    @BrendanZagaeski Is it also in the Alpha 4.2.0.21? I updated to that and it seems to have the fix as well...

  • BrendanZagaeskiBrendanZagaeski USForum Administrator, Xamarin Team Xamurai

    I install Xamarin from original Visual Studio Installer (2015 update 2) not from Xamarin Installer.
    Can I use this updater for my version?

    Yes. The updater under Tools > Options > Xamarin > Other works the same way no matter how you originally installed the Xamarin extension.

  • BrendanZagaeskiBrendanZagaeski USForum Administrator, Xamarin Team Xamurai

    Is it also in the Alpha 4.2.0.21?

    There are some fixes in this release that were added to the source code before the current Alpha version was built, so they are already included in that version. There are other fixes that were added more recently and so are not yet included in the Alpha version. (Those fixes will be included into the Alpha channel the next time it is refreshed.) There are some tentative plans for the future to keep each bug's status updated more precisely with availability across each updater channel.

    In any case, by "it," I assume you are in this instance referring to Bug 36080. And yes, the fix for that particular bug is now present on all of the updater channels: Stable, Beta, and Alpha.

  • TomMcBrideTomMcBride USMember

    After updating, using Visual Studio to debug on an iPad, the debug session doesn't shut down when I close the app on the device. If I stop the app from Visual Studio, the app closes on the device and the debug session appears to end. Regardless of whether I close the app on the device first and then stop the debug from Visual Studio or just stop the debug from Visual Studio without closing the app on the device, I'm unable to start another debug session without closing Visual Studio and restarting it.

  • BradChase.2654BradChase.2654 USMember ✭✭✭

    @BrendanZagaeski I have one more request :). I posted an thread in the Forms forum but I was wondering if something like a Nightly channel is something that could be coming in the future?

  • @BrendanZagaeski I'm still getting the libsqlite issue on Android N with this release...we're talking about this issue, right?

    "05-17 13:26:37.418 3238-3273/? W/linker: library "/system/lib/libsqlite.so" ("/system/lib/libsqlite.so") needed or dlopened by "/data/app/com.logos.androidlogos-1/lib/x86/libmonosgen-2.0.so" is not accessible for the namespace "classloader-namespace" - the access is temporarily granted as a workaround for http://b/26394120"

    === Xamarin Studio Business ===

    Version 5.10.3 (build 51)
    Installation UUID: b8e55913-dd86-416f-8bf9-112a7c76c3e2
    Runtime:
    Mono 4.2.4 (explicit/71b88f3)
    GTK+ 2.24.23 (Raleigh theme)

    Package version: 402040004
    

    === Xamarin.Profiler ===

    Not Installed

    === Apple Developer Tools ===

    Xcode 7.3.1 (10188.1)
    Build 7D1014

    === Xamarin.iOS ===

    Version: 9.6.2.4 (Xamarin Business)
    Hash: d8bedd0
    Branch: master
    Build date: 2016-05-05 17:43:01-0400

    === Xamarin.Android ===

    Version: 6.0.4.0 (Xamarin Business)
    Android SDK: /Users/dschwegler/Library/Developer/Xamarin/android-sdk-macosx
    Supported Android versions:
    4.0.3 (API level 15)
    4.4 (API level 19)
    5.0 (API level 21)
    6.0 (API level 23)

    SDK Tools Version: 25.1.6
    SDK Platform Tools Version: 23.1
    SDK Build Tools Version: 23.0.3

    Java SDK: /usr
    java version "1.8.0_77"
    Java(TM) SE Runtime Environment (build 1.8.0_77-b03)
    Java HotSpot(TM) 64-Bit Server VM (build 25.77-b03, mixed mode)

    Android Designer EPL code available here:
    https://github.com/xamarin/AndroidDesigner.EPL

    === Xamarin Android Player ===

    Not Installed

    === Xamarin.Mac ===

    Not Installed

    === Build Information ===

    Release ID: 510030051
    Git revision: f3c0d982165f785772d125f02668370d929014fb
    Build date: 2016-03-24 18:51:31-04
    Xamarin addins: ee5cfd3ecb6b20de47c1d25efb9a9abc101e8ce7
    Build lane: monodevelop-lion-cycle6-c6sr3

    === Operating System ===

    Mac OS X 10.11.4
    Darwin ws1838.lrscorp.net 15.4.0 Darwin Kernel Version 15.4.0
    Fri Feb 26 22:08:05 PST 2016
    root:xnu-3248.40.184~3/RELEASE_X86_64 x86_64

  • BrendanZagaeskiBrendanZagaeski USForum Administrator, Xamarin Team Xamurai

    I'm unable to start another debug session without closing Visual Studio and restarting it

    @TomMcBride, I was unable to replicate that behavior in my quick tests with a new template iOS app on these versions.

    Please file a bug using the new bug form for the issue you are seeing. You can then reply back on this thread with the bug number for thorough cross-referencing. The usual bug-filing recommendations apply:

    • Does the problem affect a new from template project on your system? If not, it is highly recommended to minimize the full original project to the smallest sample that still shows the problem and then attach the minimized version (optionally privately) on the bug report.

    • Include all your detailed version information and log files. In this case, be sure to include the iPad device and iOS version information as well as the IDE log files from Help > Xamarin > Zip Xamarin Logs (collected from VS immediately after you hit the problem).

    Thanks in advance!

  • BrendanZagaeskiBrendanZagaeski USForum Administrator, Xamarin Team Xamurai

    ... library "/system/lib/libsqlite.so" ("/system/lib/libsqlite.so") needed or dlopened by "/data/app/com.logos.androidlogos-1/lib/x86/libmonosgen-2.0.so" is not accessible for the namespace "classloader-namespace" - the access is temporarily granted ...

    DavidSchwegler, yes that matches the error I see reported as the primary symptom on non-public Bug 40660. The test case for that bug was:

    https://github.com/xamarin/monodroid-samples/tree/master/NotePad-Mono.Data.Sqlite

    The Xamarin QA team indicated that the sample produced the log message about libsqlite.so during launch on the previous version of Xamarin.Android but not on the new Cycle 6 – Service Release 4 version. I quickly verified this result in the Release configuration on the Android N preview emulator: I was able to replicate the message in the earlier Xamarin.Android versions, but not the new versions. If that sample works without error for you, but your full project still produces the error, please do file a bug using the new bug form that includes a zipped up sample project that demonstrates the remaining problem. Thanks in advance!

  • BrendanZagaeskiBrendanZagaeski USForum Administrator, Xamarin Team Xamurai

    something like a Nightly channel

    There might be a chance of that in the future. It can be tricky since there are several interdependent pieces that need to be in sync to have a set of builds that's usable (for example Xamarin.iOS on the Mac and XamarinVS on Windows).

    If you like, you can definitely submit an idea on Xamarin's UserVoice page as a place for potential further discussion about it.

  • BrianBocciaBrianBoccia USMember ✭✭
    edited May 2016

    ::Retracted::

  • Stefan_CaveBirdLabsStefan_CaveBirdLabs BEMember ✭✭

    It has been a while since I used Xamarin on Visual Studio. So today I installed a clean PC with all the tooling. I opened an existing Xam Forms project and these intellisense errors are still there... The project build fine but again (as months ago) my while Xam Forms project is filled with intellisense errors, InitializeComponent() errors etc.
    Is this still an issue, of is there a workaround in the meantime?

    Microsoft Visual Studio Enterprise 2015
    Version 14.0.25123.00 Update 2
    Microsoft .NET Framework
    Version 4.6.01038

    Installed Version: Enterprise

    Architecture and Modeling Tools 00322-80000-00000-AA732
    Microsoft Architecture and Modeling Tools

    UML® and Unified Modeling Language™ are trademarks or registered trademarks of the Object Management Group, Inc. in the United States and other countries.

    LightSwitch for Visual Studio 2015 00322-80000-00000-AA732
    Microsoft LightSwitch for Visual Studio 2015

    Visual Basic 2015 00322-80000-00000-AA732
    Microsoft Visual Basic 2015

    Visual C# 2015 00322-80000-00000-AA732
    Microsoft Visual C# 2015

    Visual C++ 2015 00322-80000-00000-AA732
    Microsoft Visual C++ 2015

    Windows Phone SDK 8.0 - ENU 00322-80000-00000-AA732
    Windows Phone SDK 8.0 - ENU

    Application Insights Tools for Visual Studio Package 5.2.60328.3
    Application Insights Tools for Visual Studio

    ASP.NET and Web Tools 2015.1 14.1.20512.0
    ASP.NET and Web Tools 2015.1

    ASP.NET Web Frameworks and Tools 2012.2 4.1.41102.0
    For additional information, visit http://go.microsoft.com/fwlink/?LinkID=309563

    ASP.NET Web Frameworks and Tools 2013 5.2.40314.0
    For additional information, visit http://www.asp.net/

    Azure App Service Tools v2.9 14.0.20316.0
    Azure App Service Tools v2.9

    Azure Data Lake Node 1.0
    This package contains the Data Lake integration nodes for Server Explorer.

    Azure Data Lake Tools for Visual Studio 2.0.6000.0
    Microsoft Azure Data Lake Tools for Visual Studio

    Common Azure Tools 1.7
    Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

    GitHub.VisualStudio 1.0
    A Visual Studio Extension that brings the GitHub Flow into Visual Studio.

    JavaScript Language Service 2.0
    JavaScript Language Service

    JavaScript Project System 2.0
    JavaScript Project System

    JetBrains ReSharper Ultimate 2016.1 Build 105.0.20160414.153548
    JetBrains ReSharper Ultimate package for Microsoft Visual Studio. For more information about ReSharper Ultimate, visit http://www.jetbrains.com/resharper. Copyright © 2016 JetBrains, Inc.

    Microsoft .NET Core Tools (Preview 1) 14.1.20512.0
    Microsoft .NET Core Tools (Preview 1)

    Microsoft Azure HDInsight HQL Service 2.0.6000.0
    Language service for Hive query

    Microsoft Azure HDInsight Tools for Visual Studio 2.0.6000.0
    An integrated development environment for HDInsight application development.

    Microsoft Azure Mobile Services Tools 1.4
    Microsoft Azure Mobile Services Tools

    Microsoft Azure Tools 2.9
    Microsoft Azure Tools for Microsoft Visual Studio 2015 - v2.9.40323.3

    NuGet Package Manager 3.4.3
    NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

    Office Developer Tools for Visual Studio 2015 ENU 14.0.23928
    Microsoft Office Developer Tools for Visual Studio 2015 ENU

    PreEmptive Analytics Visualizer 1.2
    Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.

    SQL Server Data Tools 14.0.60311.1
    Microsoft SQL Server Data Tools

    ToolWindowHostedEditor 1.0
    Hosting json editor into a tool window

    TypeScript 1.8.30.0
    TypeScript tools for Visual Studio

    Visual Studio Tools for Universal Windows Apps 14.0.25208.00
    The Visual Studio Tools for Universal Windows apps allow you to build a single universal app experience that can reach every device running Windows 10: phone, tablet, PC, and more. It includes the Microsoft Windows 10 Software Development Kit.

    Workflow Manager Tools 1.0 1.0
    This package contains the necessary Visual Studio integration components for Workflow Manager.

    Xamarin 4.0.4.4 (a9c7826)
    Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

    Xamarin.Android 6.0.4.0 (ee215fc)
    Visual Studio plugin to enable development for Xamarin.Android.

    Xamarin.iOS 9.6.2.2 (be25da5)
    Visual Studio extension to enable development for Xamarin.iOS.

  • BrendanZagaeskiBrendanZagaeski USForum Administrator, Xamarin Team Xamurai
    edited May 2016

    @Stefan_CaveBirdLabs, it turned out that was a bug in the Xamarin.Forms NuGet package, so you'll need to update the project to use Xamarin.Forms 2.2.0 or higher to resolve that issue. See the last few comments on the corresponding bug report for additional details.

  • Stefan_CaveBirdLabsStefan_CaveBirdLabs BEMember ✭✭

    Hi, I am using 2.2.0.31, so that seems to be OK, but still have these problems.

  • BrendanZagaeskiBrendanZagaeski USForum Administrator, Xamarin Team Xamurai
    edited May 2016

    Depending on how in-depth you want to go in troubleshooting the issue, you might want to read through the (unfortunately rather long and subtle) follow-up Bug 40666 to get a bit deeper context about one way InitializeComponent() can show up with an IntelliSense error when the .g.cs file has not been generated. (That bug also mentions where to look to see if the .g.cs file is present.) If you notice that the .g.cs file is not generated, there are various possible the reasons, including some expected ones like a missing or incorrect "Custom Tool" property on the .xaml file.

    There is also a possibility that ReSharper or another extension might be altering the behavior. You could try temporarily uninstalling the ReSharper extension to see if that changes the results.

    For a point of comparison, here's a little screencast that starts with a new Visual C# > Cross-Platform > Blank App (Xamarin.Forms Portable) project and goes through the steps of updating the Xamarin.Forms package, adding a .xaml file, and checking that the definition for InitializeComponent() has been generated correctly in the .g.cs file: https://www.youtube.com/watch?v=0WJihTF2NhE.

    For further back-and-forth troubleshooting on this issue, I'd recommend posting a question on Stack Overflow and then leaving a link to the question here so I can take a look and offer other ideas.

  • DynogicDynogic CAMember ✭✭
    edited May 2016

    @BrendanZagaeski, I'm getting the following in this release on Android N:

    "library "/system/lib/libsqlite.so" ("/system/lib/libsqlite.so") needed or dlopened by "/data/app/com.disa.ntest-1/lib/x86/libmonosgen-2.0.so" is not accessible for the namespace "classloader-namespace" - the access is temporarily granted as a workaround for http://b/26394120"

    It's stated that on https://developer.xamarin.com/releases/android/xamarin.android_6/xamarin.android_6.0/:

    "For example, SQLitePCL.raw 0.6.0 will not work on Android N, while the updated SQLitePCL.raw 0.8.6 has been updated to distribute its own copy of SQLite, and will work on Android N."

    The attached project I've tried both 0.8.6 and 0.9.0, but I still have this problem. In either versions, unzipping the APK after a release build in fact shows no libsqlite.so or libsqlite3.so in the lib folders.

    It can be seen that https://www.nuget.org/packages/sqlite-net-pcl/ references SQLitePCL.raw. Moreover, sqlite-net-pcl can be decompiled and shown to use SQLitePCL (SQLitePCL.raw) instead of direct DLLImports.

  • NealCulinerNealCuliner USBeta ✭✭✭

    I'm not sure if this is related but I see a nuget package Xamarin.Build.Download added - not sure where this came from. Maybe from a dependency of another package I am using an updated (Google AppIndexing?) but does anyone know more about what this package does and where it came from IF this was introduced in C6 SR4?

  • NealCulinerNealCuliner USBeta ✭✭✭

    Why is it you find the answer only after posting a question? haha! Yep, it's a new dependency of Google App Indexing it seems. Whoops!

  • OddbjornBakkeOddbjornBakke NOMember ✭✭

    @BrendanZagaeski said:
    There is also a possibility that ReSharper or another extension might be altering the behavior. You could try temporarily uninstalling the ReSharper extension to see if that changes the results.

    That's a little overkill maybe.
    I use the ReSharper_Suspend and ReSharper_Resume commands in VS all the time. Those should be enough.
    (as Resharper is a good tool, but to slow and buggy)

    If Suspend works. It might be a idea to try cleaning the ReSharper cache.
    (and/or turning off some of the code analytic features)

  • LarryBloomLarryBloom USMember ✭✭
    edited May 2016

    After updating to this release it broke all of my references

    it flags the following as unavailable/Error

    using System.Net;
    using CoreGraphics;
    using System.Linq;
    using System.Xml;
    using System.Xml.XPath;
    using UIKit;
    using MonoTouch.Dialog;
    using Tamarin;

    Note: This is in multiple projectes

  • BrendanZagaeskiBrendanZagaeski USForum Administrator, Xamarin Team Xamurai
    edited May 2016

    SQLitePCL.raw...
    In either versions, unzipping the APK after a release build in fact shows no libsqlite.so or libsqlite3.so in the lib folders

    @Dynogic, I'll aim to take a quick look at the test case and the SQLitePCL.raw library, but in general the problem in SQLitePCL.raw would need to be addressed by the authors of that library. It won't be something that can be resolved on the Xamarin side. That said, it is possible the comment in the Xamarin release notes about that 3rd-party library is inaccurate, so I'll plan to double-check on that.

  • BrendanZagaeskiBrendanZagaeski USForum Administrator, Xamarin Team Xamurai
    edited May 2016

    I use the ReSharper_Suspend and ReSharper_Resume commands in VS all the time. Those should be enough

    Unfortunately that might not provide the cleanest results in every case. See for example Bug 38829: "Suspending ReSharper is not sufficient to re-enable Xamarin.Forms IntelliSense extension..."

    So the best option is probably to try both tests: suspending and uninstalling. You can start with either test, as long as you remember to try the other one too if appropriate (for example, if suspending does not resolve the problem, be sure to try uninstalling too).

  • BrendanZagaeskiBrendanZagaeski USForum Administrator, Xamarin Team Xamurai
    edited May 2016

    After updating to this release it broke all of my references

    LarryBloom, that sounds like a good question to ask on Stack Overflow to gather troubleshooting ideas because there are many potential causes (feel free to reply back in this thread with a link to that question to remind me to take a glance at it). It sounds like something got "nudged" in an unexpected way during the installation on your particular system.

    To check on a few basics that would be good to include in the Stack Overflow question (to be diligent about https://stackoverflow.com/help/how-to-ask):

    • Are you in Xamarin Studio on Mac or Visual Studio on Windows?

    • It looks like this is happening in a Xamarin.iOS app project, correct? Does it happen with a new template iOS app project?

    • As a bit of a "raw" check, are the library files present on the system? For example, do the System*.dll files appear in the expected location?

      Mac: /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/2.1/
      Windows: C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Xamarin.iOS\v1.0

  • TomMcBrideTomMcBride USMember
    edited May 2016

    @TomMcBride said:
    After updating, using Visual Studio to debug on an iPad, the debug session doesn't shut down when I close the app on the device. If I stop the app from Visual Studio, the app closes on the device and the debug session appears to end. Regardless of whether I close the app on the device first and then stop the debug from Visual Studio or just stop the debug from Visual Studio without closing the app on the device, I'm unable to start another debug session without closing Visual Studio and restarting it.

    After using the setup for a few days, I believe the problem may be related to the Mac I have. It's an "Intel Core 2 Duo" running at 2.8 GHz with 2 GB RAM. If I try to start VS up with a storyboard in the editor, I get timeouts on the IDB, Build, and Designer. Eventually, the storyboard comes up, but the device always says iPhoneSimulator>Start. If I bring VS up with some C# in the editor, the IDB, Build, and Designer start and if delay going to the storyboard till I see the device say iPhone>Tom's Ipad, things are fine.

    So, seems like the timeouts are set too short to handle my old (2008), slow Mac.

    Tom

  • KashifShaikhKashifShaikh CAMember ✭✭
    edited May 2016

    We are getting this issue with new Android 6.0.4 release running on Nexus 6P with Marshmallow. This happens only when I "Archive for Publishing" and then export Adhoc build and install the apk via adb or via hockeyapp, I get this error at startup - which seems like the new sqlite library is not there and the app crashes asap.

    5-24 16:29:59.529: E/(23415): Error initializing
    05-24 16:29:59.529: E/(23415): System.DllNotFoundException: libsqlite3_xamarin.so
    05-24 16:29:59.529: E/(23415): at (wrapper managed-to-native) Mono.Data.Sqlite.UnsafeNativeMethods:sqlite3_open_v2 (byte[],intptr&,int,intptr)
    05-24 16:29:59.529: E/(23415): at Mono.Data.Sqlite.SQLite3.Open (System.String strFilename, SQLiteOpenFlagsEnum flags, Int32 maxPoolSize, Boolean usePool) [0x0004f] in :0
    05-24 16:29:59.529: E/(23415): at Mono.Data.Sqlite.SqliteConnection.Open () [0x002b2] in :0
    05-24 16:29:59.529: E/(23415): at Asgl.Core.Infrastructure.Impl.SqliteDatabaseProviderImpl.GetConnection (Boolean autoOpen) [0x0001c] in :0
    05-24 16:29:59.529: E/(23415): at Asgl.Core.Infrastructure.Impl.SqliteDatabaseProviderImpl.Create () [0x0002d] in :0
    05-24 16:29:59.529: E/(23415): at Asgl.Core.AppGlobal.Initialize (ISystemServiceProvider systemServiceProvider) [0x00020] in :0
    05-24 16:29:59.531: I/MonoDroid(23415): UNHANDLED EXCEPTION:
    05-24 16:29:59.531: I/MonoDroid(23415): System.DllNotFoundException: libsqlite3_xamarin.so
    05-24 16:29:59.531: I/MonoDroid(23415): at (wrapper managed-to-native) Mono.Data.Sqlite.UnsafeNativeMethods:sqlite3_open_v2 (byte[],intptr&,int,intptr)
    05-24 16:29:59.531: I/MonoDroid(23415): at Mono.Data.Sqlite.SQLite3.Open (System.String strFilename, SQLiteOpenFlagsEnum flags, Int32 maxPoolSize, Boolean usePool) [0x0004f] in :0
    05-24 16:29:59.531: I/MonoDroid(23415): at Mono.Data.Sqlite.SqliteConnection.Open () [0x002b2] in <filename

  • BrendanZagaeskiBrendanZagaeski USForum Administrator, Xamarin Team Xamurai

    @KashifShaikh, I attempted to replicate that problem using the NotePad-Mono.Data.Sqlite sample that the QA team was using to test the new behavior of libsqlite in this release. I tried the following steps:

    1. Build the project in the Release configuration via Build > Archive for Publishing with Xamarin Studio 5.10.3.51 and Xamarin.Android 6.0.4.0.

    2. Select the new archive in the Archives pad and then click the Sign and Distribute button.

    3. Select Ad-Hoc and proceed through the signing steps with an Android signing identity.

    4. Install the app on the Android device via adb install Notepad.Notepad.apk. (I tested on a Moto G Marshmallow device as well as the Google x86 Android N emulator.)

    5. Run the app.

    Results

    The app starts without error and displays the "Sample Note" list item as expected. The libsqlite3_xamarin.so library is also located in the expected location on device:

    adb shell ls /data/data/Notepad.Notepad/lib/libsqlite3_xamarin.so
    /data/data/Notepad.Notepad/lib/libsqlite3_xamarin.so
    

    Next steps

    Does the problem affect the NotePad-Mono.Data.Sqlite sample on your system? If not, it is highly recommended to minimize your full project to the smallest sample that still shows the problem and then attach the minimized version (optionally privately) on a new bug using the new bug form. You can then reply back on this thread with the bug number for thorough cross-referencing. Thanks in advance!

  • KashifShaikhKashifShaikh CAMember ✭✭

    @BrendanZagaeski, I already reverted back to Release 3 for now - I'll try creating a sample app - but our app initializes our database within the Application class and perhaps the mono.sqlite stuff hasn't been initialized at that time?

    This is roughly how it is done:

    public class AsglApplication : Application {
    
        public AsglApplication(IntPtr handle, JniHandleOwnership transfer) : base(handle, transfer) {}
    
        public override void OnCreate() {
            base.OnCreate();
            CreateDatabase();
            // Do other stuff
        }
    
    
        public override void OnLowMemory() {
            base.OnLowMemory();
            GC.Collect();
        }
        public CreateDatabase() {
            var dbFilePath = "/sdcard/aa/database.db3";
            Mono.Data.Sqlite.SqliteConnection.CreateFile(dbFilePath);
            var connection = new SqliteConnection("Data Source=" + dbFilePath);
            connection.Open(); // <---- CRASHES HERE with stack trace above
            var createDatabaseScript = "create table..." // read in from file
            using (var command = connection.CreateCommand()) {
                command.CommandText = createDatabaseScript;
                command.ExecuteNonQuery();
            }
        }
    }
    
  • EternalBardEternalBard BRBeta ✭✭

    Same problem here on Nexus 10 just on Cycle 7 update

  • BrendanZagaeskiBrendanZagaeski USForum Administrator, Xamarin Team Xamurai

    To reiterate the next steps for an issue where "System.DllNotFoundException: libsqlite3_xamarin.so" appears only when archiving for publishing:

    Next steps

    Does the problem affect the NotePad-Mono.Data.Sqlite sample on your system? If not, it is highly recommended to minimize your full project to the smallest sample that still shows the problem and then attach the minimized version (optionally privately) on a new bug using the new bug form. You can then reply back on this thread with the bug number for thorough cross-referencing. Thanks in advance!

    Thanks again!

  • EternalBardEternalBard BRBeta ✭✭

    Almost the same problem. It's happening on debug mode, Xamarin Android Player with Nexus 10. First I'll try this: https://forums.xamarin.com/discussion/67901/sql-lite-errors-in-existing-android-app-after-latest-update-breaking-change-after-update if I find how to "rolling back to old version".

  • EternalBardEternalBard BRBeta ✭✭

    Nope.. it didn't help. Actually, is the same case of the link, a project that run since Novell.. and after update to Cycle 7 debug the app throes the error about do not find sqlite3_xamarin.so, like:

    [Mono] DllImport error loading library '/system/lib/libsqlite3_xamarin.so': 'dlopen failed: library "/data/app-lib/my.project-1//system/lib/libsqlite3_xamarin.so" not found'.

    I think that is strange the part "/my.project-1//system/lib"

  • EternalBardEternalBard BRBeta ✭✭

    Just to know, on a Galaxy Tab 2 it can debug. On Xamarin Android Player with Nexus 10 doesn't.

This discussion has been closed.