Xamarin v10.3.99.259 Release Notes

Release Date: 2020-06-03 // almost 4 years ago
  • June 2, 2020 โ€” Xamarin.Android 10.3.99.259 was published as part of Visual Studio 2019 version 16.7 Preview 2 and Visual Studio 2019 for Mac version 8.7 Preview 2.

    ๐Ÿš€ Corresponding Visual Studio 2019 Preview release notes

    In Xamarin.Android 10.3.99.259

    ๐Ÿ”ง Deprecations, removals, and default configuration changes

    Minimum compatible Android version now Android 5.0 Lollipop (API level 21)

    The minimum compatible Android version for Xamarin.Android apps is now Android 5.0 Lollipop (API level 21).

    Error XA0001 will now appear for projects that have an earlier target framework version set under Compile using Android version: (Target Framework) in the Visual Studio project properties pages:

    error XA0001: Unsupported or invalid $(TargetFrameworkVersion) value of 'v4.4'. Please update your Project Options.
    

    Simiarly, warning XA4216 will now appear for projects that have an earlier version set for the minSdkVersion in the AndroidManifest.xml file:

    warning XA4216: AndroidManifest.xml //uses-sdk/@android:minSdkVersion '20' is less than API-21, this configuration is not supported.
    

    Background information

    ๐Ÿš€ The unmanaged native libraries that are part of Xamarin.Android are now built to target Android 5.0 Lollipop (API level 21), so apps built using this release can abort due to incompatible APIs if run on earlier Android versions.

    Preview bindings for Android 11 Developer Preview 4

    This version includes preview bindings for the fourth Developer Preview of Android 11 from Google. See the Android 11 Developer Preview documentation for additional information about the behavior and API changes in this new Android version. To try the bindings for the new APIs in a Xamarin.Android project, set Compile using Android version: (Target Framework) to Android 10.0.99 (R) under the Application tab of the Visual Studio project property pages. This sets the TargetFrameworkVersion property to v10.0.99 in the .csproj file:

    \<TargetFrameworkVersion\>v10.0.99\</TargetFrameworkVersion\>
    

    ๐Ÿ‘ Bindings projects support for methods with more than 14 parameters

    ๐Ÿ‘ Xamarin.Android bindings projects now support binding Java methods that have any number of parameters instead of the previous limit of 14.

    โšก๏ธ D8 and R8 version update to 1.6.82

    โšก๏ธ The version of the D8 DEX compiler and R8 code shrinker included in Xamarin.Android has been updated from 1.5.68 to 1.6.82.

    โšก๏ธ bundletool version update to 0.14.0

    ๐Ÿš€ The version of the bundletool executable included in Xamarin.Android has been updated from 0.10.2 to 0.14.0, bringing in several improvements and bug fixes.

    โšก๏ธ ProGuard version update to 6.2.2

    โšก๏ธ The version of ProGuard included in Xamarin.Android has been updated from 5.3.2 to 6.2.2, bringing in a number of improvements and bug fixes.

    Note: ProGuard is only relevant for projects configured to use the older DX DEX compiler. Project authors are recommended to update to the newer D8 DEX compiler at their earliest convenience.

    ๐Ÿ›  Issues fixed

    Application behavior on device and emulator

    • Developer Community 1024028, GitHub 4596, GitHub 4660: In Xamarin.Android 10.3.99.230, System.MemberAccessException: Cannot create an instance of ... could cause apps to abort when attempting to use certain APIs that have both generic and non-generic versions.
    • โšก๏ธ GitHub 3784, GitHub 4471: An outdated version of the Mono Shared Runtime package was sometimes left on target development devices and emulators after Xamarin.Android version updates. This could result in unexpected behaviors in Debug configuration apps until the old shared runtime was manually uninstalled.
    • GitHub PR 4589: ObjectDisposedException could in theory be thrown during cancellation of AndroidClientHandler requests, depending on the particular timing of cancellation and object disposal. The time window where this can happen is now narrower.

    ๐Ÿš€ Application and library build and deployment

    • GitHub PR 4640: System.ArgumentException: Illegal characters in path could prevent successful automatic detection of the Android SDK location during builds in some cases if an AndroidSdkDirectory registry value was set for Xamarin.Android that contained unexpected characters. One possible cause of this issue has now been addressed.

    IDE compatibility

    • ๐Ÿ— GitHub 4675: The project ... is missing Android SDKs required for building. prevented building without the Android NDK installed for projects with Enable Startup Tracing or AOT Compilation enabled.

    Bindings projects

    • ๐Ÿ‘ Java.Interop GitHub 631: Xamarin.Android bindings projects did not yet support binding Java methods with more than 14 parameters.

    Installing

    โšก๏ธ To get the new version in Visual Studio, update Visual Studio:

    For other scenarios, the latest commercial .vsix and .pkg installer packages can be found in the project README.

    Open source

    Xamarin.Android 10.4 is based on the open-source Xamarin.Android repositories: