Xamarin.Android 9.1.101 Preview Release Notes
- Visual Studio 2019 Preview 1 – Visual Studio Installer
- Visual Studio 2019 for Mac Preview 1 – Visual Studio 2019 for Mac Preview Installer with the Xamarin Preview updater channel
Additional information for the Visual Studio 2019 for Mac Preview: After downloading and running the Visual Studio 2019 for Mac Preview installer, launch the new Visual Studio 2019 for Mac Preview app and switch the updater channel to Xamarin Preview to try the new Xamarin.Android preview version. Note that this will also change the Xamarin.Android and Xamarin.iOS versions used by any existing Visual Studio 2017 for Mac installation.
What's new in this release
- Build and Deployment Performance Improvements
- App Performance Improvements
- Preliminary Support for
- Removal of armeabi Support
Build and deployment performance improvements
This release includes several more improvements to build and deployment times.
- GitHub PR 2088:
_CopyIntermediateAssembliestarget to replace a couple uses of the
CopyIfChangedand avoid calling the
Touchtask. This improved the incremental build time for a test project from roughly 7 seconds to roughly 6.5 seconds.
- GitHub PR 2124:
Add conditions and correct item wildcards for the
_CreateAapt2VersionCachetarget to improve build times in projects configured to use AAPT2.
- GitHub PR 2129:
Split part of the
ConvertResourcesCasestask into a new
ConvertCustomViewtask to avoid repeating work later in the build. This saves roughly half the time spent in the
ConvertResourcesCasestask, which can be several seconds or more for an initial clean build.
- GitHub PR 2148:
AssemblyDefinitioninstances during the
BuildApktask. This improved the overall build time for a test project by about 5%.
- GitHub PR 2162:
StripEmbeddedLibrariestask to be a linker step to save one pass of loading the assemblies for writing and to avoid redundant work on assemblies that the linker would skip. This improved the combined time of stripping and linking for a test project in the Release configuration from 16.1 seconds to 15.4 seconds.
- GitHub PR 2168:
Remove some redundant work the
ResolveAssembliesbuild task was doing when iterating through assembly metadata.
- GitHub PR 2174:
CheckTargetFrameworkstask into the
ResolveAssembliestask to save one pass of reading through assembly metadata.
- The Build Performance Results page on the project wiki for additional comparisons and updates about the on-going work to continue to improve performance.
- The latest numbers from the continuous integration builds.
App performance improvements
- GitHub PR 1886, GitHub PR 2147: Avoid unnecessary string allocations during app startup.
- GitHub PR 2008, GitHub PR 2126: Use a faster approach to register managed methods with the Android runtime during app startup.
- GitHub PR 2025: Slightly reduce the overhead of setting up managed method overrides and callback methods for types in or subclassed from Java bindings.
Preliminary Support for
Android 6.0 (API level 23) introduced a new way to handle native shared
libraries that are packaged as part of APKs. Before that API level, the
libraries would always be extracted and placed in the application data
directory, consuming extra space on the file system. API level 23 added a new
<application> element attribute
android:extractNativeLibs to control whether the native libraries are
extracted during installation. If the attribute is set to
false, then Android
6.0 and higher will skip the extraction step and attempt to load the libraries
directly from the APK instead.
Xamarin.Android 9.1.101 adds preliminary compatibility support for this functionality. At the moment, enabling this mode requires a few manual steps:
android:extractNativeLibs="false"attribute to the
<application>element in the Properties\AndroidManifest.xml file
$(AndroidStoreUncompressedFileExtensions)MSBuild property to
.soin your .csproj file:
<PropertyGroup> <AndroidStoreUncompressedFileExtensions>.so</AndroidStoreUncompressedFileExtensions> </PropertyGroup>
Add an android environment file to the project with the following contents:
Removal of armeabi support
Due to the removal of armeabi support in Android NDK r17,
Xamarin.Android 9.1.101 no longer supports the armeabi architecture. Projects
that have this old ABI selected in the
property will now need to remove it. The newer armeabi-v7a ABI should be used
$(AndroidSupportedAbis) setting can be found in the Advanced
section of the Android Options project properties in Visual Studio and the
Android Build project properties in Visual Studio for Mac.
- December 04, 2018 - Xamarin.Android 188.8.131.52
December 04, 2018 - Xamarin.Android 184.108.40.206
This version is included in the Visual Studio 2019 Preview 1 and Visual Studio 2019 for Mac Preview 1 releases.
- GitHub 1615:
AndroidClientHandlerdid not provide TLS 1.1 or TLS 1.2 support on Android versions 4.1 to 4.4.
- GitHub 2029,
Build errors could potentially occur in projects configured to use
AAPT2 if they also referenced NuGet packages that provided custom
- GitHub PR 2108: The built-in list of types, methods, and fields to preserve when linking mscorlib included some redundant and outdated items.
- GitHub PR 2117: A few build tasks were generating warnings or errors that did not include numbered codes.
- GitHub 2141: App deployment could fail due to an "INSTALL_FAILED_CONFLICTING_PROVIDER" error when using certain recent Android libraries such as Crashlytics that contain their own AndroidManifest.xml file.
- GitHub 2143:
Desugarbuild task did not pass the
desugar_deploy.jar, resulting in build errors about missing types when desugaring certain .jar files.
- GitHub PR 2150:
CopyAndConvertResourcesbuild tasks contained redundant try/catch blocks.
- GitHub PR 2187:
CompileToDalvikbuild task was passing individual input item names on the command line to
dx.jarinstead of combining the names into a file and using the
--input-listoption. This could potentially cause issues with command line length limitations in cases where many inputs were given.
- GitHub 2193: Building, adding a new view to a .axml layout file, and then deploying an application could lead to an "Android.Views.InflateException... Attempt to invoke virtual method on a null object reference" error when running the app because the layout file updates were not deployed as expected.
- GitHub 2200:
Builds could hit a new error in Xamarin.Android 9.1 instead of automatically
using the default detected location as expected in projects that had a
nonexistent custom path explicitly set in the
Integrated Mono features/fixes
Due to source branching strategy, this first Xamarin.Android 9.1.101 preview does not yet include the fix for the following issue:
- GitHub 2205: Android resource conflicts can occur after rebuilds in projects referencing the Xamarin.GooglePlayServices.Basement NuGet package if the projects include a google-services.json file and are configured to use AAPT2.
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 under Help > Report a Problem.
A big Thank You! to contributors who made improvements in this release:
- Tim Wanders: Tidy up the Makefile used to build Xamarin.Android from source on macOS and Linux. GitHub PR 1870.
- Tim Wanders: Improve compatibility for building Xamarin.Android from source on Arch Linux. GitHub PR 1871.
- eric liu:
Desugarbuild task to pass the
desugar_deploy.jar. GitHub PR 2158
Xamarin.Android 9.1.101 is based on the open-source Xamarin.Android repositories: