Xamarin.Android 10.3.99.259
Pre-releaseJune 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
- Preview bindings for Android 11 Developer Preview 4
- Bindings projects support for methods with more than 14 parameters
- D8 and R8 version update to 1.6.82
- bundletool version update to 0.14.0
- ProGuard version update to 6.2.2
- Issues fixed
- Installing
- Open source
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 ofAndroidClientHandler
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:
- Visual Studio 2019 version 16.7 Preview 2 — Visual Studio Installer
- Visual Studio 2019 for Mac 8.7 Preview 2 — Visual Studio for Mac Installer with the Preview updater channel
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:
- The Mono runtime and class library artifacts for this version come from the android-release-Darwin-*.7z archive generated by the Mono open-source build: archive-mono/job/2020-02 build #76.
- Core JNI interaction logic is in the Java.Interop repo.
- Android bindings and MSBuild tooling are in the xamarin-android repo.
- Chat is in the
xamarin/xamarin-android
Gitter channel.