Stable Release: Xamarin.Android 5.1.6, Cycle 5 – Service Release 4

BrendanZagaeskiBrendanZagaeski USForum Administrator, Xamarin Team Xamurai
edited October 2015 in Xamarin.Android

Windows

  • Xamarin.VisualStudio_3.11.894.msi (d70d139)

Mac

  • mono-android-5.1.6-7.pkg (58099c5)

Reason for release: Additional bug fixes for the "Cycle 5" Stable Release on April 29 and the previous Cycle 5 Service Releases. (See the release blog for a short description of "Cycles" and "Service Releases.")

Release notes: http://developer.xamarin.com/releases/android/xamarin.android_5/xamarin.android_5.1/#Xamarin.Android_5.1.6

Date published: See https://releases.xamarin.com/.

Previous versions, downgrading

You can downgrade back to the previous Stable version by manually reinstalling each old package. See the KB article on downgrading. If you have a Trial or Starter subscription, feel free to contact [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 ("Service Release 3") is available here:

Older versions (from before April 29)

If needed, you can downgrade back to older versions (from before April 29) by manually reinstalling each old package. See the "Previous versions, downgrading" section on the April 29 Stable release thread for the older downgrade links.

Guidelines for this thread

  1. This first post will be updated regularly.

  2. The goal of this thread is to help answer "what might break if I update to this release?"

  3. If you find a new problem that is specific to this version:

    a. If you can share some specific error messages or can reproduce the problem consistently, please email the information you have so far to [email protected].

    b. If you only have a general description of the problem, you can post it directly on this forum thread so that hopefully a member of the Xamarin team or another user will recognize it and be able to help fill in some details.

Fixes for known issues from recent release threads

  • Non-public Bug 30481, Bug 29557 - [Mono] [Android] [iOS] SqlConnection.GetSchema() fails with "SourceTable is required to be a non-empty string".

New known issues

  • Bug 34391 - [Android] "System.DllNotFoundException". The EmbeddedNativeLibrary build action does not work correctly in second-order library references. Partial workaround: Add a direct reference in the Android application project to the library that contains the EmbeddedNativeLibrary.

Remaining known issues from the April 29 Stable Channel release, with more common or severe issues near the top

  • Bug 30513 - [Android] The logged stack traces from exceptions thrown within async methods do not include the actual location where the exception was thrown. Fixed in the current "Cycle 6 Preview" Alpha version. (Partial workaround: switch back to the old Xamarin.Android 4.x exception propagation style by setting the XA_BROKEN_EXCEPTION_TRANSITIONS environment variable to true (see also Bug 30513, Comment 11))

  • Bug 30548 - [Android] Under certain conditions new threads take several seconds to start. This problem seems to be triggered by Xamarin.Insights 1.10. Partial workarounds: upgrade Xamarin.Insights to version 1.10.3, downgrade to version 1.9, or remove it entirely.

  • Bug 30915 - [Xamarin Studio] [Android] Xamarin Studio repeatedly asks for the password for the selected certificate when attempting to sign using SHA1withDSA certificates from keystore files. Xamarin Studio should instead display the error message from jarsigner: "private key algorithm is not compatible with signature algorithm" as it did in Xamarin Studio 5.8. (SHA1withRSA or MD5withRSA certificates do work without error.)

  • Bug 29731 - [Android] Android.Bluetooth.BluetoothAdapter.Enable is incorrectly marked as [Obsolete("deprecated")] for API level 20 and higher.

Remaining known issues from Cycle 5 – Service Release 2

  • Bug 31423 - [XamarinVS] [Android] [iOS] Locked .dll files: "Could not copy "... PortableClassLibrary1.dll" to "bin\Debug\PortableClassLibrary1.dll". Exceeded retry count of 10. Failed." This is a different problem than Bug 26841 because it affects .dll files rather than .dll.mdb files. It appears to be less common than Bug 26841. The results to date suggest that it is a bug in Visual Studio itself rather than in the Xamarin extensions. For example, it appears to be possible to hit the problem using a Windows Phone project, with no Xamarin involvement at all. The recent changes to the Xamarin "Clean project" process to properly remove stale files might have caused this to become easier to hit with Xamarin projects. In any case, it is still under investigation.

EDIT Oct 09: Add Android Bug 34391.

Posts

  • Since upgrading, I get "java.lang.NoSuchMethodError: no method with name='getDrawable' signature='(I)Landroid/graphics/drawable/Drawable;' in class Landroid/content/Context;" when trying to call MyActivity.GetDrawable(Resource.Drawable.MyID);

    It looks like the method signature may be wrong in the assembly?

  • Since upgrading, I've noticed that shared objects embedded in DLLs using EmbeddedNativeLibrary no longer get installed on the device and the application fails with a "file not found" error trying to dlopen the native library. Adding the native library to the application using AndroidNativeLibrary works, but is not desirable because the native library in question is actually part of a NuGet package we include in our application (NLua). Note that things have been working fine for a long time and only broke with the Xamarin.Android upgrade as far as we can ascertain. Downgrading causes things to work again.

  • BrendanZagaeskiBrendanZagaeski USForum Administrator, Xamarin Team Xamurai
    edited October 2015

    @PatriceBoissonneault, many thanks for the report and apologies for the slow follow-up. The busy recent release schedule including the Xamarin.iOS 9.0 Stable release, the Xamarin.iOS 9.0 follow-up service release, and the various Cycle 6 Alpha releases have kept me tied up for the past few weeks. Moving forward I will adjust my recommendation on these announcements to encourage direct bug reports and provide pre-formatted bug links to make it easier to file bugs directly. Direct bug reports will help distribute the follow-up investigation among the Xamarin QA and engineering teams and allow for more detailed discussion of specific symptoms.

    "no method with name='getDrawable'"

    Turning back to your specific error, I made a first attempt to reproduce it by creating a new template Android App, copying an Icon.png file into the drawable folder, and then replacing the OnCreate() method with the following:

    protected override void OnCreate(Bundle savedInstanceState)
    {
        base.OnCreate(savedInstanceState);
    
        // Set our view from the "main" layout resource
        SetContentView(Resource.Layout.Main);
    
        Console.WriteLine(Resources.GetDrawable(Resource.Drawable.MyDrawable));
    }
    

    But unfortunately this was not sufficient to hit the problem in my tests using Xamarin.Android 5.1.6-7. (Side note: I believe the correct GetDrawable() method is in the Resources class?)

    I have attached the minimal test case for reference.

    Next steps

    Especially if you are still able to reproduce the problem on the new Android M support release or the Alpha channel "release candidate" for the Cycle 6 feature release, please do file a quick bug using the appropriate link at the top of those linked forum threads. The initial bug report can be as simple as pasting your forum comment directly into the Description of the bug. Of course, if by chance you might also be able to zip up and attach a test case that demonstrates the problem, and add a short description of the steps to reproduce, that will likely save some back-and-forth on the bug report.

    If you can still reproduce the problem and you are not yet ready to update to either of the newer versions, please use this link to file the bug report.

    Thanks in advance!


    EDIT Oct 8: Adjust text formatting

  • BrendanZagaeskiBrendanZagaeski USForum Administrator, Xamarin Team Xamurai

    @DanielMadill, thanks for the report. I found another recent report of that issue under Bug 34391, and I was able to confirm that the problem is indeed a regression in Cycle 5 – Service Release 4. I have accordingly added it under "New known issues" in the first post in the thread.

    Bug 34391 - [Android] "System.DllNotFoundException". The EmbeddedNativeLibrary build action does not work correctly in second-order library references. Partial workaround: Add a direct reference in the Android application project to the library that contains the EmbeddedNativeLibrary.

  • DanielMadillDanielMadill USMember

    Thank you for the update and partial workaround, and thank you for making it a "New known issue". I appreciate all the great work the Xamarin team does.

This discussion has been closed.