Xamarin.Android 13.0 release notes
| GitHub | Developer Community | System requirements | Blogs |
Important
This release is not "go-live" and not intended for use on production computers or for creating production code.
Installing
Xamarin.Android 13.0 releases are distributed as part of Visual Studio 2022 17.3.
Visual Studio 2022 version 17.3 — Visual Studio Installer (release notes)
Visual Studio 2022 for Mac Preview — Visual Studio for Mac Installer with the Preview updater channel (release notes)
What's new in Xamarin.Android 13.0
Xamarin.Android 13.0 releases
- July 12, 2022 — Xamarin.Android 13.0.0
Xamarin.Android version 13.0.0
Released July 12, 2022, and included in Visual Studio 2022 version 17.3 and Visual Studio 2022 for Mac Preview.
- Android 13 (API-33) Bindings
- Breaking Changes
- App build system changes
- Debugger
- Mono.Android
- .NET 6 Improvements
Android 13 (API-33) Bindings
Android 13 adds a number of new APIs in
API-33, which are now available when
$(TargetFrameworkVersion)
=v13.0, and with .NET 6 by setting $(TargetFramework)
=net6.0-android33.0.
API diffs between $(TargetFrameworkVersion)
=v12.1 and $(TargetFrameworkVersion)
=v13.0.
Breaking Changes
XA1023 is now an error
(PR #7073, Commit 01812123)Warning XA1023 was a warning about the deprecation of the
dx
utility, and has been emitted since Xamarin.Android 11.0.XA1023 is now an error.
Warning XA2000 for
MONO_GC_BRIDGE=bridge-implementation=old
(Issue #6875, PR #6883, Commit f8ce1f95)The dotnet/runtime team plans on removing support for the
MONO_GC_BRIDGE=bridge-implementation=old
backend in .NET 7.Check for usage of
MONO_GC_BRIDGE=bridge-implementation=old
, and emit an XA2000 warning if found.
App build system changes
Emit an APT0004 error if a Resource name starts with an Invalid Character.
(PR #6845, Commit 09e8cb5c)Include ProGuard v7.1.1
(PR #6983, Commit d8f84867)Bump manifest-merger from 30.1.3 to 30.2.0
(PR #6911, PR #7002, Commit b5053d77, Commit 9fd37e3d)Bump r8 from 3.1.51 to 3.3.28
(PR #6910, Commit 9f3ee589)Bump to xamarin/Java.Interop/main@2a882d2d
(Issue #967, PR #6939, Commit 2cca764d)Fixes
generator
to prevent CS1503 errors when settingmanagedType
tostring
.Add support for new
$(AndroidManifestType)
MSBuild property.
(PR #6963, Commit 64b22fc9)The
InstallAndroidDependencies
target now supports an$(AndroidManifestType)
property to control whether the Supported list of Android SDK components is used, or the Unsupported list direct from Google. Set$(AndroidManifestType)
toXamarin
for the Supported list, orGoogleV2
for the Unsupported list.Bump SQLite to 3.38.5
(PR #6994, Commit 2a4c58c6)Bump to mono/mono/2020-02@dffa5ab9
(PR #6872 PR #7014, Commit bbba5a21 Commit 6568f901)Fix loading of refonly assemblies for "classic" apps
(Issue #7091, PR #7094, Commit 80706791)Improve Javadoc import for properties
(PR #7108, Commit fc276627)AndroidGenerateResourceDesigner
& Design-Time Builds
(Issue #1440274, PR #6844, Commit 84070275)Fixes an ambiguity in IntelliSense when a member exists in both
Resource.designer.cs
and the Design-Time Build-generatedResource.designer.cs
.New LLVM-based toolchain
(PR #6683, Commit b21cbf94, PR #6946, Commit e1f2198e, PR #6921, Commit 16bbf6f0)Previously, Xamarin.Android used the GNU Binutils toolchain to compile and link native assembler code contained in e.g.
libxamarin-app.so
. We are now using LLVM 14 instead of GNU Binutils.Fix
LayoutBinding
underAndroidX
when__HAVE_ANDROIDX__
is set
(Issue #6893, PR #6894, Commit bfc68172)<JavaToolTask/>
Error Reporting
(Issue #7009, PR #7012, Commit b002dc38)Report more
java
tool output when an error occurs, so that the associated errors are potentially explicable.
Debugger
- Fix issue when trying to debug two assemblies with similar names
(Issue #7089, PR #7113, Commit 40930d0b)
Mono.Android
Update
AndroidMessageHandler
to parse cookies on redirect whenAndroidMessageHandler.AllowAutoRedirect
is set
(Issue #3954, PR #6987, Commit efb693f9)Bump to xamarin/android-api-docs/main@5c4bf28f
(PR #7099, Commit c59b591d) Improves IntelliSense documentation forMono.Android.dll
.Remove background Task in
AndroidMessageHandler
(Issue #6854, PR #6857, Commit 5c3d4059)add another "built-in" JNINativeWrapper
(PR #6855, Commit f5ae4ca4, PR #6931, Commit b79fd6ca)improve performance when creating multi-dimension Java-side arrays
(PR #6870, Commit 0b9a0dc7)preserve public methods for
GetJniHandleConverterForType
(Issue #6895, PR #6923, Commit 782dd675)Fixes a
JavaProxyThrowable
>ArgumentNullException
crash.custom validation callback for server certificates in HTTP handlers
(PR #6665, Commit 48540d69)No
[SupportedOSPlatform]
onSpannableString
members
(PR #6976, Commit 9295858f)Fixes a CA1416 warning when using e.g.
SpannableString.Length()
on platforms older than API-29, even thoughSpannableString.Length()
was present in API-1.Prevent NRE in VS Mac when breaking on exceptions
(Issue #1554705, Issue #7085, PR #7103, Commit 3d5231ca)Speed up java-to-managed typemap lookups
(PR #6905, Commit f48b97cb)
.NET 6 Improvements
improve
<ManifestMerger/>
error messages
(Issue #6634, PR #6694, Commit bacc3f02)Call
JNIEnv.Initialize()
directly, via function pointer
(PR #6880, Commit 16680700)Enable lazy loading of AOTd assemblies
(Issue #6935, PR #6940, Commit 6dc426f1)Fix targeting API 33, build API 31 ref pack
(Issue #6914, PR #6896, Commit 0ab3db07)support building net6.0-android apps in .NET 7
(PR #6988, Commit fd47b027)add win-arm64 support to the workload
(Issue #1544836, PR #7037, Commit ac5bb6b9, PR #7052, Commit 06ff6564)Pack
@(AndroidLibrary)
item group containing.aar
files in.nupkg
(Issue #7040, PR #7045, Commit 868ef054)fix missing libaot-* files when building in IDEs
(Issue #16#issuecomment-1158183178, PR #7109, Commit 03085c5f)added a simple way to record AOT profiles
(PR #7021, Commit c1a1eb2e)default
$(UseInterpreter)
=True for Debug mode
(Issue #6729, Issue #6841, PR #6843, Commit d4da1c25)Strip AOT
.so
s when linking
(Issue #6840, PR #6842, Commit 5efda9d6)fix
dotnet build --runtime
and$(AndroidLinkTool)
=r8 at the same time
(PR #6929, Commit a58d4e97)fix
r8
andaapt_rules.txt
(PR #6957, Commit 5ed4a517)Add
%(AndroidJavaSource.Bind)
(PR #5926, Commit 67ce902c)Update the
@(AndroidJavaSource)
Build action:In .NET 7, all
**\*.java
files are automatically added to the@(AndroidJavaSource)
Build action.Add
%(AndroidJavaSource.Bind)
item metadata, a boolean value (default is True) which controls whether or not the file is compiled and bound prior to the C# build.
The combination of these means that custom Java code can be added to any .NET Android project, and a binding of that Java code will be usable by the C# code. Both Java code and bindings will be included in App builds of referencing apps.
There are some restrictions on the Java code. You can only use Java types or types which are defined in
.jar
or.aar
files referenced by the project via@(AndroidLibrary)
or@(EmbeddedJar)
. It is suggested that you do not havepublic
Java types which use Java generics. As with normal bindings, Java generics can cause significant problems; try to stick to normal types if you can.@(AndroidJavaSource)
& parameter names
(PR #7046, Commit 6b43af37)
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.0 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.