Xamarin.Android 9.1 Release Notes
System Requirements | What's New | Blogs | Open Source
Installing
- Visual Studio 2017 version 15.9 – Visual Studio Installer
- Visual Studio 2017 for Mac version 7.7 – Stable updater channel
What's New in this Release
Important
Xamarin.Android 9.1 Security Advisory Notices
- December 11, 2018 -- Xamarin.Android 9.1.4.2
Build and Deployment Performance Improvements
This release includes several improvements to incremental build and deployment times. For example, in a test development environment, the incremental build time after modifying one XAML page in the SmartHotel360 sample app has dropped from 11 seconds to 9 seconds and the corresponding deployment time has dropped from 9 seconds to 5 seconds.
- See the Build Performance Results page on the project wiki for additional comparisons as well as updates about the on-going work to continue to improve performance.
- Follow along with the latest numbers from the continuous integration builds.
Specific Improvements
- GitHub PR 1938:
ResolveSdks
now caches the output ofjava -version
andjavac -version
in memory, speeding up builds with multiple Xamarin.Android projects. - GitHub PR 1957: Design-time builds were preventing future full builds from building incrementally.
- GitHub PR 2088: Fix incremental builds for Xamarin.Forms projects.
- GitHub PR 2093:
Improve LINQ usage in
ConvertResourcesCases
- GitHub PR 2130: Move inline C# MSBuild task to a compiled assembly
- GitHub PR 2131:
Remove unnecessary MSBuild target, simplify inputs to
_CompileToDalvik
- GitHub PR 2132:
The
_BuildLibraryImportsCache
target was always running - GitHub PR 2140:
Leave
classes.zip
uncompressed, to speed upjavac
anddx
- GitHub PR 2157: Build Xamarin Java.Interop as a Xamarin.Android class library rather than a Portable Class Library. This reduces the number of assemblies references that need to be resolved during app builds.
Release History
- February 13, 2019 - Xamarin.Android 9.1.8.0 in Visual Studio 2017 for Mac version 7.7
- February 12, 2019 - Xamarin.Android 9.1.7.0 in Visual Studio 2017 version 15.9.7
- January 16, 2019 - Xamarin.Android 9.1.5.1 in Visual Studio 2017 for Mac version 7.7
- January 8, 2019 - Xamarin.Android 9.1.5.0 in Visual Studio 2017 version 15.9.5
- December 11, 2018 - Xamarin.Android 9.1.4.2 in Visual Studio 2017 version 15.9.4 and Visual Studio 2017 for Mac version 7.7
- November 28, 2018 - Xamarin.Android 9.1.0.38 in Visual Studio 2017 for Mac version 7.7
- November 13, 2018 - Xamarin.Android 9.1.0.38 in Visual Studio 2017 version 15.9
You can learn more about how we ship our releases in the Visual Studio 2017 Release Rhythm document.
February 13, 2019 - Xamarin.Android 9.1.8.0
This version is included in the Visual Studio 2017 for Mac version 7.7 release.
Integrated Mono Features/Fixes
Xamarin.Android uses Mono 5.14 Commit b5381878.
This aligns Xamarin.Android to the Mono commit used by the matching releases of Xamarin.iOS and Xamarin.Mac.
February 12, 2019 - Xamarin.Android 9.1.7.0
This version is included in the Visual Studio 2017 version 15.9.7 release.
Integrated Mono Features/Fixes
Xamarin.Android uses Mono 5.14 Commit 62031dca
- Developer Community 379758,
GitHub 10488:
HttpWebRequest
was sometimes leaving exceptions unobserved in its internalTask
objects, resulting in uncatchable exceptions that in turn caused noisy invocations of any event handlers subscribed to theTaskScheduler.UnobservedTaskException
event.
January 16, 2019 - Xamarin.Android 9.1.5.1
This version is included in the Visual Studio 2017 for Mac version 7.7.3 release.
Issues Fixed
- The Xamarin.Android installer package for macOS caused a dialog "To use the 'java' command-line tool you need to install a JDK." to appear after installation if the Microsoft Mobile OpenJDK Distribution was the only installed JDK.
January 8, 2019 - Xamarin.Android 9.1.5.0
This version is included in the Visual Studio 2017 version 15.9.5 release.
Issues Fixed
- GitHub 2257: Apps that referenced hundreds of assemblies would quit unexpectedly during startup because they consumed too many JNI local references: "JNI ERROR (app bug): local reference table overflow (max=512)". The local references are now released more aggressively, allowing this kind of app to run successfully.
- GitHub 2408:
The
@(AndroidAarLibrary)
Build Action could lead to errors about missing resources during incremental builds. This particular cause of errors about missing resources should not have affected many users yet because the@(AndroidAarLibrary)
build action is primarily intended for future use in Android library bindings NuGet packages published by the Xamarin team.
December 11, 2018 - Xamarin.Android 9.1.4.2
This version is included in the Visual Studio 2017 version 15.9.4 and Visual Studio 2017 for Mac version 7.7 releases.
Security Advisory Notices
CVE-2018-8292 Xamarin.Android Information Disclosure Vulnerability
An information disclosure vulnerability exists in Xamarin.Android when
authentication information is inadvertently exposed in a redirect when the
AndroidClientHandler
for HttpClient
is used. The managed
HttpClientHandler
is not affected. An attacker who successfully exploited
this vulnerability could use the information to further compromise the web
application. This latest Xamarin.Android update addresses the vulnerability by
correcting how AndroidClientHandler
handles redirects.
Issues Fixed
- GitHub 1923:
HTTP redirects to relative URLs caused "System.InvalidCastException: Unable
to convert instance of type 'Java.Net.URLConnectionInvoker' to type
'Java.Net.HttpURLConnection'" exceptions when
HttpClient
was set to useAndroidClientHandler
. - GitHub 1924:
HTTP authorization headers were not cleared after HTTP redirects when
HttpClient
was set to useAndroidClientHandler
(CVE-2018-8292).HttpClient
usesAndroidClientHandler
if an instance ofAndroidClientHandler
is passed to theHttpClient
constructor or if the$(AndroidHttpClientHandlerType)
MSBuild property orXA_HTTP_CLIENT_HANDLER_TYPE
environment variable is set toXamarin.Android.Net.AndroidClientHandler
and theHttpClient
constructor is called with no arguments.
Integrated Mono Features/Fixes
Xamarin.Android uses Mono 5.14 Commit 000780ca
- GitHub 11731:
The non-generic versions of a few types related to
ValueTask
were not yet available in Xamarin.Android's mscorlib.dll. Those non-generic types are now available. The corresponding System.Threading.Tasks.Extensions.dll facade assembly will be added in the next Xamarin.Android feature release.
November 13, 2018 - Xamarin.Android 9.1.0.38
This version is included in the Visual Studio 2017 version 15.9 and Visual Studio 2017 for Mac version 7.7 releases.
Issues Fixed
- GitHub 1584: The Xamarin.Android developer tools in Visual Studio 2017 on Windows included a separate copy of the fairly large API documentation .xml file for each target Android API level. A new capability in the latest Visual Studio 2017 release means that now only one copy of the file is needed.
- GitHub 1766: Builds did not provide a warning to caution users that Google Play now requires new apps and app updates to target at least Android 8.0 (API level 26).
- GitHub 1770: Some warnings from AAPT were being treated as errors in projects using the new experimental support for AAPT2.
- GitHub 1828:
Updating NuGet packages could leave intermediate build files in a state
where a
Rebuild
was required. - GitHub 1830: App startup performed more string allocations than necessary, increasing the total time to launch.
- GitHub 1931:
AndroidClientHandler
was using commas rather than spaces in the HTTPUser-Agent
header. - GitHub 1958: Design-time builds were preventing future full builds from building incrementally.
- GitHub 1960: Building two or more Xamarin.Android projects at the same time could lead to unexpected warnings due to a shared temporary file.
- GitHub PR 1971: Invalid Android resource files caused a generic exception message during design-time builds rather than a more informative error message.
- GitHub PR 1973:
Apps would exit due to an exception if built with
$(AndroidEnableDesugar)
enabled, unless ProGuard or multidex was also enabled. - GitHub PR 1984: Apps deployed via fast deployment would crash during startup if Xamarin.Android had been updated or if the Mono shared runtime had been manually uninstalled between deployments.
- GitHub 1985:
The
$(AndroidResgenExtraArgs)
MSBuild property caused unclear error message in projects using the new experimental support for AAPT2 rather than indicating that the property was no longer applicable. Also, newaapt2
properties$(AndroidAapt2CompileExtraArgs)
and$(AndroidAapt2LinkExtraArgs)
were not yet available. - GitHub 2047: Only one resource ID was being generated when two resources had names that were the same except for capitalization in projects using the new experimental support for AAPT2.
- GitHub 2060:
Per-ABI APKs from projects that had both
$(AndroidUseApkSigner)
and$(AndroidCreatePackagePerAbi)
enabled were not signed. - GitHub PR 2084:
The chances of hitting a
PathTooLongException
increased in Xamarin.Android 9.0 due to the new subdirectories that preserve outputs from previously selected target frameworks (GitHub PR 1628). - GitHub 2183: Builds could fail on a ".../obj/Release/lp/ is not empty" error if the Updating Resources background build step was running when a build was started.
- GitHub 2205:
Android resource conflicts could occur after rebuilds in projects
referencing the Xamarin.GooglePlayServices.Basement NuGet package if the
projects included a google-services.json file and had experimental
aapt2
support enabled. - GitHub PR 2249:
Builds did not provide a warning to caution users that support for the
armeabi
value in$(AndroidSupportedAbis)
would be removed in the next releases after Visual Studio 2017 version 15.9 and Visual Studio 2017 for Mac version 7.7. - GitHub PR 2258: A few build tasks were generating warnings that did not include numbered warning codes. A few other tasks were emitting diagnostic information as warnings rather than debug messages.
- GitHub PR 2329:
Builds did not provide compilation warnings on individual types to caution
users that support for the
v2.3
,v4.0.3
,v4.1
,v4.2
, andv4.3
values in$(TargetFrameworkVersion)
would be removed in the next releases after Visual Studio 2017 version 15.9 and Visual Studio 2017 for Mac version 7.7. - A few different incompatibility issues and unclear error messages could happen when using the Microsoft Mobile OpenJDK Distribution Preview or when no JDK was installed.
- Changing the
android:versionCode
app manifest attribute to a lower number would lead to an "[INSTALL_FAILED_VERSION_DOWNGRADE]" error during deployment. cmd.exe
windows were opening in some cases for steps that launched tools from the Android toolchain.
Integrated Mono Features/Fixes
Xamarin.Android uses Mono 5.14 Commit 969357ac
Feedback welcome
Your feedback is important to us. If there are any problems with this release, check our GitHub Issues, Xamarin.Android Community Forums and Visual Studio Developer Community for existing issues. For new issues within the Xamarin.Android SDK, please report a GitHub Issue. For general Xamarin.Android experience issues, let us know via the Report a Problem option found in your favorite IDE via Help > Report a Problem.
Contributors
A big Thank You! to contributors who made improvements in this release:
- Ruben Buniatyan:
AndroidClientHandler
was using commas rather than spaces in the HTTPUser-Agent
header. GitHub PR 2017.
OSS Core
Xamarin.Android 9.1 is based on the open-source Xamarin.Android repositories:
- 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.