Xamarin v11.1.99.218 Release Notes
Release Date: 2020-12-08 // over 3 years ago-
No data yet ๐
You can check the official repo
Previous changes from v11.1.99.168
-
What's new in Xamarin.Android 11.2
November 10, 2020 โ Xamarin.Android 11.1.99.168 was published as part of Visual Studio 2019 version 16.9 Preview 1 and Visual Studio 2019 for Mac version 8.9 Preview 1.
๐ Corresponding Visual Studio 2019 Preview release notes
What's new
- ๐ Build and deployment performance
- ๐ Rewritten fast deployment system
- ๐ Deprecation of DebugType full and pdbonly
- ๐ Deprecation of AAPT in favor of AAPT2
- ๐ Better file association for Android manifest syntax errors
- ๐ Removal of ${library.imports:} support in AndroidResgenExtraArgs MSBuild property
- ๐
UseShortFileNames=false
is no longer supported - ๐ Notable issues fixed
- ๐ All enhancements and issues fixed in Xamarin.Android 11.2
- Other changes in Xamarin.Android 11.2
- Thank you
- Installing
- Open source
๐ง Deprecations, removals, and default configuration changes
- ๐ Deprecation of DebugType full and pdbonly
- ๐ Deprecation of AAPT in favor of AAPT2
- ๐ Better file association for Android manifest syntax errors
- ๐ Removal of ${library.imports:} support in AndroidResgenExtraArgs MSBuild property
- ๐
UseShortFileNames=false
is no longer supported
๐ Build and deployment performance
๐ GitHub PR 5188: Improve performance by lazily loading an Android resource mapping file that is only used for error messages. This reduced the overall build time by 348 milliseconds in a real-world project in an initial clean build or incremental builds with Android resource changes.
๐ Rewritten fast deployment system
๐ As part of this update, the fast deployment system used for Debugging apps has been changed. The shared runtime and shared platform packages are no longer used or required.
The new system also no longer uses the external drive for the fast deployment files. All of the files and tooling are now stored in the application's internal directory. This has an advantage in that when the application is uninstalled, all of the files and the tooling will be removed as well.
๐ The new system will not work on any devices older than Android 5.0 Lollipop (API level 21). This is because it relies on features that only work from API level 21 onwards. Also API level 21 is the lowest supported platform for the runtime, so running and debugging on older devices will be impossible.
๐ See Documentation for more details.
๐ Deprecation of DebugType full and pdbonly
warning XA0125: 'AndroidApp1.pdb' is using a deprecated debug information level. Set the debugging information to Portable in the Visual Studio project property pages or edit the project file in a text editor and set the 'DebugType' MSBuild property to 'portable' to use the newer, cross-platform debug information level. If this file comes from a NuGet package, update to a newer version of the NuGet package or notify the library author.
Support for .mdb or .pdb symbols files that were built with the
DebugType
MSBuild property set tofull
orpdbonly
is now deprecated. This applies to .mdb and .pdb files in application projects as well as in referenced libraries, including NuGet packages.๐ Set
DebugType
toportable
in the application project as well all library references.portable
is the recommended setting for all projects from now on. The olderfull
andpdbonly
settings are for older Windows-specific file formats. .NET 6 and higher will not support those older formats.๐ In Visual Studio, go to Properties > Build > Advanced in the project property pages and change Debugging information to Portable.
๐ In Visual Studio for Mac, go to Build > Compiler > Debug information in the project property pages and change Debug information to Portable.
โก๏ธ If the problematic symbol file comes from a NuGet package, update to a newer version of the package or notify the library author.
๐ Deprecation of AAPT in favor of AAPT2
warning XA1026: Using AAPT is deprecated in favor of AAPT2. Please enable 'Use incremental Android packaging system (aapt2)' in the Visual Studio project property pages or edit the project file in a text editor and set the 'AndroidUseAapt2' MSBuild property to 'true'.
๐ Google has deprecated the AAPT command-line tool in favor of AAPT2 going forward. Xamarin.Android has accordingly now deprecated
<AndroidUseAapt2>false</AndroidUseAapt2>
as well.๐ Update the
AndroidUseAapt2
MSBuild property totrue
to select AAPT2. This property corresponds to the Use incremental Android packaging system (aapt2) setting in the Visual Studio project properties pages. Alternatively, remove<AndroidUseAapt2>
from the .csproj file to let the build select the default valuetrue
.Important : AAPT2 will in some cases enforce stricter rules on resource files than the previous AAPT, so some adjustments might be needed if you see new error messages that come from AAPT2 itself rather than from the Xamarin.Android build tasks.
If needed, the
--legacy
switch can run AAPT2 in an AAPT compatibility mode. Add the following to your .csproj file:\<PropertyGroup\> \<AndroidAapt2CompileExtraArgs\>--legacy\</AndroidAapt2CompileExtraArgs\> \</PropertyGroup\>
๐ Better file association for Android manifest syntax errors
Syntax errors in AndroidManifest.xml previously always referred to the generated version of the file (like obj\Debug\90\android\manifest\AndroidManifest.xml), even for syntax errors that were also present in the manually configured input Properties\AndroidManifest.xml file. Android manifest errors are now fixed up to point to the Properties\AndroidManifest.xml file. The errors also now include a note to inform users that manifest generation attributes in source code files can be responsible for the errors in some cases.
๐ Removal of ${library.imports:} support in AndroidResgenExtraArgs MSBuild property
๐ A text templating feature for AAPT and AAPT2 has been removed that provided a workaround for the Amazon Fire Phone:
\<AndroidResgenExtraArgs\>-I ${library.imports:eac-api.jar} -I ${library.imports:euclid-api.jar}\</AndroidResgenExtraArgs\>
The
${library.imports:...}
syntax should no longer be needed by modern Android libraries. .aar files are the recommended way for Java/Kotlin libraries to distribute Android resources to be consumed by Xamarin.Android application projects.๐ Note that the
AndroidResgenExtraArgs
andAndroidAapt2LinkExtraArgs
MSBuild properties will continue to pass additional arguments toaapt
andaapt2 link
with the${library.imports:...}
syntax removed.๐
UseShortFileNames=false
is no longer supportedIn previous versions of Xamarin.Android, you could set the
UseShortFileNames
MSbuild property in your .csproj file:\<PropertyGroup\> \<UseShortFileNames\>false\</UseShortFileNames\> \</PropertyGroup\>
This would tell Xamarin.Android's MSBuild targets to use the "long" folder names such as:
- obj\Debug\lp -> __library_projects__
- obj\Debug\lp*\jl -> library_project_imports
- obj\Debug\lp*\nl -> native_library_imports
๐ This was useful when
UseShortFileNames
was a new feature, giving developers a way to "opt out" if they hit a bug. However,UseShortFileNames
has defaulted totrue
since around July 2017 to help with the Windows API maximum path length limitation.๐ This functionality has been removed from Xamarin.Android. Short file names will be used going forward.
๐ Notable issues fixed
๐ Application and library build and deployment
Developer Community 1184573: Xamarin Android falsely saying that Resource does not exist in the current context (CS0103). Duplicate
attr
elements indeclare-styleable
styles were causing the design-time build system to crash. As a result the Resource.designer.cs was not being updated.Developer Community 1036602, GitHub Issue 5009: Starting in Xamarin.Android 10.2, .pdb files were not included in the APK if the managed linker was enabled.
๐ GitHub Issue 4996: application deploy on Android 11 emulator fails with Mono.AndroidTools.AdbException: secure_mkdirs failed: Permission denied
๐ Github PR 5107: Starting in Xamarin.Android 11.0, building solutions in parallel with
msbuild YourSolution.sln -m
could fail with errors such as:obj\Release\100\android\manifest\AndroidManifest.xml(7,0): error APT2260: resource mipmap/ic_launcher (aka com.companyname.skiasharpsample:mipmap/ic_launcher) not found. obj\Release\100\android\manifest\AndroidManifest.xml(7,0): error APT2260: resource string/app_name (aka com.companyname.skiasharpsample:string/app_name) not found. obj\Release\100\android\manifest\AndroidManifest.xml(7,0): error APT2260: resource mipmap/ic_launcher_round (aka com.companyname.skiasharpsample:mipmap/ic_launcher_round) not found. obj\Release\100\android\manifest\AndroidManifest.xml(9,0): error APT2260: resource style/MainTheme.Splash (aka com.companyname.skiasharpsample:style/MainTheme.Splash) not found. Xamarin.Android.Aapt2.targets(226,3): error APT2067: failed processing manifest.
๐ All enhancements and issues fixed in Xamarin.Android 11.2
Other changes in Xamarin.Android 11.2
Thank you
A big _ Thank You! _ to community members who contributed improvements in this release:
- ๐ง @Freakness109, GitHub PR 5093: Implement support for ArchLinux pacman.
Installing
- Visual Studio 2019 version 16.9 Preview โ Visual Studio Installer
- Visual Studio 2019 for Mac 8.9 Preview โ 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 11.2 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 #android channel on the DotNetEvolution Discord server.