Xamarin.Android 13.2 release notes
| GitHub | Developer Community | System requirements | Blogs |
Installing
Xamarin.Android 13.2 releases are distributed as part of Visual Studio 2022 17.5 and later.
Visual Studio 2022 version 17.5 — Visual Studio Installer (release notes)
Visual Studio 2022 for Mac Preview — Visual Studio for Mac Installer
What's new in Xamarin.Android 13.2
Xamarin.Android 13.2 releases
- October 10, 2023 — Xamarin.Android 13.2.2.0
- August 8, 2023 — Xamarin.Android 13.2.1.2
- June 20, 2023 - Xamarin.Android 13.2.0.6
- February 21, 2023 - Xamarin.Android 13.2.0.0
Xamarin.Android version 13.2.2.0
Released October 10, 2023, and included in Visual Studio 2022 version 17.8 Preview 3, and Visual Studio for Mac 17.6.
Xamarin.Android 13.2.2.0 has two significant changes:
JDK-17 Support
JDK-17 can now be used to build Xamarin.Android apps.
API-34 can be targeted
Xamarin.Android 13.2.2.0 does not bind API-34; you cannot use Android types or
methods introduced in API-34 such as
android.credentials.Credential
.
To use types and methods introduced in API-34, use
the .NET 8 SDK for Android.
Xamarin.Android 13.2.2.0 allows you to target API-34, by setting the
//uses-sdk/@android:targetSdkVersion
attribute to 34
:
<uses-sdk minSdkVersion="21" targetSdkVersion="34" />
Setting the targetSdkVersion
attribute to 34 will allow your app to be submitted to
and/or updated in the Google Play Store after 2024-Aug-31.
Note: setting the targetSdkVersion
attribute to 34 may result in XA1008 warnings:
…/Xamarin.Android.Legacy.targets(348,5): warning XA1008: The TargetFrameworkVersion (Android API level 33) is lower than the targetSdkVersion (34).
Please increase the `$(TargetFrameworkVersion)` or decrease the `android:targetSdkVersion` in the `AndroidManifest.xml` so that the API levels match.
The XA1008 warning may be safely ignored.
Xamarin.Android version 13.2.1.2
Released August 8, 2023, and included in Visual Studio 2022 version 17.7, Visual Studio 17.8 Preview 1, and Visual Studio for Mac 17.6.
We recommend that all users upgrade to Xamarin.Android 13.2.1.2, rebuild, and resubmit their apps to the Google Play Store and other stores before Android 14 is released in late 2023.
TimeZoneInfo
support on Android 14
- Bump to mono/mono/2020-02@d9a6e871
(Issue #8028, Issue #8175, Commit 9e116587)
Fix Debugging on Android 9
- Bump to mono/mono/2020-02@73df89a7
(Issue #7658, PR #8054, Commit d81914ea)
Xamarin.Android verison 13.2.0.6
Released June 20, 2023, and included in Visual Studio 2022 version 17.6.
Fix debugging of System apps
- Bump to xamarin/monodroid/d17-5@9b69cb11
(Issue #10247269, Issue #1714340, PR #7744, Commit f595b0bf)
External Dependency Bumps
- Bump SQLite to 3.40.1
(PR #7733, Commit 84ce8f12)
Runtime Fixes
Replace
exit()
withabort()
in native code
(PR #7734, Commit 4b242239)Prevent overlapped decompression of embedded assemblies
(Issue #7335, PR #7732, Commit a200af12)
Xamarin.Android version 13.2.0.0
Released February 21, 2023, and included in Visual Studio 2022 version 17.5.
External Dependency Bumps
Bump manifest-merger from 30.2.0 to 30.3.1
(PR #7050, Commit 065973ce) (PR #7238, Commit becca174) (PR #7397, Commit c7484db3) (PR #7467, Commit 764bdea5)Bump SQLite to 3.40.0
(PR #7197, Commit b4998c88) (PR #7337, Commit 382165d0) (PR #7564, Commit 263eaefb)Changes which might be interesting for us:
- Security enhancement:
SQLITE_DBCONFIG_DEFENSIVE
is augmented to prohibit changing the schema_version. The schema_version becomes read-only in defensive mode. - Change the algorithm used by SQLite's built-in pseudo-random number generator (PRNG) from RC4 to Chacha20.
- Miscellaneous performance optimizations result in about 1% fewer CPU cycles used on typical workloads.
- Security enhancement:
Bump to mono/opentk/main@daa9b2d5
(PR #7192, Commit 24732186)Bump to lz4/lz4/v1.9.4@5ff83968 [v1.9.4]
(PR #7262, Commit b2c59aec)Bump r8 from 3.3.28 to 3.3.75
(PR #7292, Commit 4defba22)Build with Android NDK r25
(PR #6764, Commit 3ded9a87) (PR #7305, Commit 8ff84a2a)Bump to Tessil/robin-map/master@784245b4 [v1.0.1]
(PR #7382, Commit e4a4d245)Bump to mono/mono.posix@d8994ca, xamarin/LibZipSharp@98e9173
PR #7309, Commit 91f330f4)Bump to mono/mono/2020-02@a96bde97
(PR #7372, Commit 615a8f28)Bump to mono/mono/2020-02@6dd9def5
(PR #7574, Commit d61b32ff)
Runtime Fixes
Java.Interop:
(Issue #335, Issue #954, Issue #976, Issue #981, Issue #992, PR #7157, Commit 59352f83) (Issue #969, Issue #982, Issue #984, PR #7180, Commit ace5f71c) (PR #7226, Commit 3e4686cf) (Issue #7234, PR #7266, Commit 4da27921) (PR #7308, Commit a5d8d399) (Issue #1031, PR #7380, Commit ebbee6f1) (PR #7420, Commit 0d75c3de) (PR #7358, Commit 2c7d72d2) (Issue #1034, Issue #1051, PR #7502, Commit 6573c373) (PR #7543, Commit 3c4ce72f) (PR #7545, Commit 8a208030) (PR #7592, Commit 525b080d) (PR #7625, Commit e8f1f486)Introduces a new BG8403 binding warning when a bound type has the same name as its enclosing namespace name-part, e.g.
Example.View.View
.SourceLink support for
Java.Interop.dll
.Disable loading of libLLVM at runtime
(PR #7499, Commit b5678d7b)Use Environment.SpecialFolder.UserProfile, not SpecialFolder.Personal
(PR #7481, Commit ab6712a4)Bump to xamarin/monodroid/main@8c54ea6d
(PR #7576, Commit 2e10309b)Fixes a
FormatException
fromAndroidDevice.RunShellCommandAsync()
:System.FormatException: Index (zero based) must be greater than or equal to zero and less than the size of the argument list. at System.Text.StringBuilder.AppendFormatHelper(IFormatProvider provider, String format, ParamsArray args) at System.String.FormatHelper(IFormatProvider provider, String format, ParamsArray args) at System.String.Format(String format, Object[] args) at Mono.AndroidTools.AndroidLogger.LogError(String task, String format, Object[] args) in D:\a\_work\1\s\External\androidtools\Mono.AndroidTools\AndroidLogger.cs:line 63 at Mono.AndroidTools.AndroidDevice.<>c__DisplayClass118_0.<RunShellCommandAsync>b__0() in D:\a\_work\1\s\External\androidtools\Mono.AndroidTools\AndroidDevice.cs:line 1012
Fix reading assembly store hashes in AssemblyStoreReader
(Commit c03c953a)Add
[Flags]
to Android.Nfc.NfcReaderFlags.
(Issue #7409, PR #7410, Commit 4195e483)
Build Fixes
Bump to xamarin/monodroid/main@135be73
(PR #7384, Commit 3269e51a) Various Fast Deployment fixes.Handle Empty
R.txt
file.
(Issue #1439405, PR #7133, Commit 57f280c5)ManagedResourceParser
would assume thatR.txt
would contain four entries space-delimited entries per line, e.g.int layout main 0x7f030000
If
ManagedResourceParser
encountered a line that didn't have four space-delimited entries, then it would crash:System.IndexOutOfRangeException: Index was outside of bounds of the array. as Xamarin.And.Tasks.ManagedResourceParser.ProcessRtxtFile (System.String file)
Use ProGuard config files from
.aar
files.
(Issue #3752, PR #5310, Commit c537dd28)Use binutils for Aot and LLVM
(PR #6901, Commit 346a9330)$(AndroidLinkResources)
and Styleables
(Issue #7194, PR #7306, Commit d521ac02)See also dotnet/maui#7038.
The initial version of
$(AndroidLinkResources)
was too broad in its removal of Resource classes and fields. Certain fields such asStyleable
arrays were not called using the ILstsfld
opcode. As a result they could not be easily replaced with constant usage.However, the linker removed all the fields from the
Resource
nested types. This would result in the following error at runtime:System.BadImageFormatException: 'Could not resolve field token 0x0400000b'
This was because the
int[]
fields were removed as part of the linking process.Fix this by leaving the
int[]
fields in theResource
nested types instead of removing them.We can still remove all the other
int
fields.Add
@(AndroidPackagingOptionsExclude)
(Issue #6920, PR #7356, Commit 2726a386)Certainly NuGet packages pull in Kotlin-related artifacts which aren't required at runtime. These artifacts contribute to
.apk
package size.Add support for a new
@(AndroidPackagingOptionsExclude)
item group. This contains a "search pattern" similar to thesearchPattern
parameter ofDirectory.EnumerateFiles(path, searchPattern)
, in which:*
matches 0 or more characters?
matches 1 character.
The default items within
@(AndroidPackagingOptionsExclude)
are:DebugProbesKt.bin
*.kotlin_*
Files which match the search patterns within
@(AndroidPackagingOptionsExclude)
are excluded from.aab
and.apk
files, reducing app size.Avoid XA5207 for design-time builds
(Issue #7405, PR #7434, Commit 5044377a)Fix
aapt_rules.txt
corruption
(Issue #7447, PR #7587, Commit 6383b4e9)When building a project with
$(AndroidCreatePackagePerAbi)
=True, the build may fail with:MSBUILD : java.exe error JAVA0000: Error in obj\Release\110\aapt_rules.txt at line 289, column 1: [C:\Jenkins\workspace\Demo\Demo.Android\Demo.Android.csproj] MSBUILD : java.exe error JAVA0000: Expected char '-' at obj\Release\110\aapt_rules.txt:289:1 [C:\Jenkins\workspace\Demo\Demo.Android\Demo.Android.csproj] MSBUILD : java.exe error JAVA0000: nit>(...); } [C:\Jenkins\workspace\Demo\Demo.Android\Demo.Android.csproj] MSBUILD : java.exe error JAVA0000: Compilation failed
Fix this file corruption.
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 under Help > Report a Problem.
Open source
Xamarin.Android 13.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.