Xamarin v11.1.0.15 Release Notes

Release Date: 2020-10-13 // over 3 years ago
  • October 13, 2020 โ€” Xamarin.Android 11.1.0.15 was published as part of Visual Studio 2019 version 16.8 Preview 4 and Visual Studio 2019 for Mac version 8.8 Preview 4.

    ๐Ÿš€ Corresponding Visual Studio 2019 Preview release notes

    What's new

    Corrected garbage collection behavior for Android bindings and bindings projects

    In previous Xamarin.Android versions, errors similar to JNI DETECTED ERROR IN APPLICATION: use of deleted global reference and JNI ERROR (app bug): attempt to use stale Global 0x2a2a (should be 0x2a26) could cause apps to abort under certain specific timing conditions where a managed garbage collection started just after a Java.Lang.Object subclass method call.

    ๐Ÿ— The Xamarin.Android bindings project build process now includes a fix for this issue.

    โšก๏ธ The set of Android API bindings that are included directly as part of the Xamarin.Android SDK have been updated accordingly to include the fix.

    Note: This fix will not solve the problem for other bindings libraries until the libraries are rebuilt using this new Xamarin.Android version. Bindings library authors are therefore encouraged to build and publish new versions of their libraries using this new Xamarin.Android version at their earliest convenience.

    ๐Ÿ›  Issues fixed

    ๐Ÿš€ Application and library build and deployment

    • โšก๏ธ Developer Community 1141659: Starting in Xamarin.Android 11.0, the Updating Resources... build step could get stuck indefinitely if .DS_Store or any file starting with . was included in the project with the AndroidResource Build Action.
    • โšก๏ธ Developer Community 1141659: Starting in Xamarin.Android 11.0, the Updating Resources... build step could get stuck indefinitely if a NuGet package containing an AndroidResource file name starting with . was included in a project.
    • Developer Community 1144910: Starting in Xamarin.Android 11.0, errors similar to error APT2260: resource mipmap/ic_launcher (aka com.companyname.skiasharpsample:mipmap/ic_launcher) not found and error CS0117: 'Resource' does not contain a definition for 'Layout' could prevent building projects when maximum number of parallel project builds was set higher than one in the Visual Studio options or when the -m switch was used in command line MSBuild builds.
    • Developer Community 1182026: Starting in Xamarin.Android 11.0, the Executing compile -o ... build step could get stuck indefinitely on certain systems where Environment.ProcessorCount returned 1.
    • ๐Ÿ GitHub 4677: On Windows, running the InstallAndroidDependencies MSBuild target on the command line did not yet allow continuous build environments to install the Android SDK dependencies as expected.
    • ๐Ÿง GitHub 5043: i686-linux-android-ld.EXE: error: cannot open ... Debug\monoandroid10.0\android\typemaps.x86.o: No such file or directory could prevent building projects located under paths that contained .s.

    Android API bindings

    • GitHub PR 5106: Bindings for overloads of Map.Of() that took more than fourteen parameters were not yet available.

    Bindings projects

    • GitHub 5027: Syntax errors similar to ) expected could prevent building bindings projects after updating the Compile using Android version: (Target Framework) setting to Android 11 (R).
    • โš  Java.Interop GitHub 682: Ignorable warning BG8604: top ancestor ... not found for nested type ... appeared for public types nested under non-public types in Kotlin libraries. Those nested types are now skipped as expected.
    • Java.Interop GitHub 717: Error while processing type ... Type 'android.app.IntentService' was not found. prevented building bindings for libraries with classes that inherited from android.app.IntentService.
    • Java.Interop GitHub 719: Bindings did not yet use GC.KeepAlive() calls to ensure that method arguments would never be garbage collected before they were passed to Java.

    Application Mono Framework behavior on device and emulator

    ๐Ÿš€ This version of Xamarin.Android updates the Mono 6.12 runtime and class libraries from Commit 83105ba2 to Commit be2226b5, adding 17 new commits.

    ๐Ÿ›  Fixes included for issues reported with Xamarin.Android applications:

    • Mono GitHub 8806: DWARF debugging symbols were incorrect for projects configured to use AOT Compilation with Use LLVM Optimizing Compiler.

    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 11.1 is based on the open-source Xamarin.Android repositories: