.NET 7 RC 1, Android 33.0.0-rc.1.151
Pre-release- Android 13 (API-33) Bindings
- App build system changes
- Runtime Optimizations
- Debugger
- Mono.Android
- Templates
Android 13 (API-33) Bindings
Android 13 adds a number of new APIs in
API-33, which are now available when
by setting $(TargetFramework)
=net7.0-android33.0.
App build system changes
-
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. -
Bump manifest-merger 30.2.2
(PR #7238,
Commit becca174) -
Bump to xamarin/java.interop/main@032f1e71
(Issue #335,
Issue #954,
Issue #976,
Issue #981,
Issue #992,
PR #7157,
Commit 59352f83,
Issue #969,
Issue #982,
Issue #984,
PR #7180,
Commit ace5f71c,
Issue #7234,
PR #7266,
Commit fe619530)Kotlin-related binding fixes.
Fix
generator
so that when a Javaabstract
method is annotated with@Deprecated
,
the corresponding binding is attributed with[Obsolete]
.generator
now emits a BG8403 warning when a bound type has the same name as its
enclosing namespace name-part, e.g.Example.View.View
.generator
can now emit[ObsoletedOSPlatformAttribute]
. -
Fix for a compatibility issue between AOT and LLVM 14
(PR #6946,
Commit e1f2198e) -
Exclude proguard files from .NET packs
(PR #6985,
Commit bca381f0) -
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) -
pack
.aar
files in@(AndroidLibrary)
references into the.nupkg
(Issue #7040,
PR #7045,
Commit 868ef054) -
default $(EnableSingleFileAnalyzer) to true again
(PR #7177,
Commit 74c57efd) -
fix $(DebuggerSupport) for Release builds
(PR #7176,
Commit 822667f4) -
Generate LLVM IR, not native asm
(PR #6853,
Commit 5271f3e1) -
Fix LayoutBinding under AndroidX
(Issue #6893,
PR #6894,
Commit bfc68172) -
Add
%(AndroidJavaSource.Bind)
(PR #5926,
Commit 67ce902c)Update the
@(AndroidJavaSource)
Build action:-
Starting with .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 stuck to normal types if you can. -
-
JavaToolTask Error Reporting
(Issue #7009,
PR #7012,
Commit b002dc38)Improve reporting of error messages generated by Java tooling.
-
@(AndroidJavaSource)
& parameter names
(PR #7046,
Commit 6b43af37)Import parameter name information from
@(AndroidJavaSource)
when
%(Bind)
is True. -
Handle Empty R.txt file.
(Issue #1439405,
PR #7133,
Commit 57f280c5) -
Remove deprecated DX & ProGuard code
(PR #7135,
Commit dbadf130) -
fix
@(LibraryProjectZip)
and NuGets
(PR #7151,
Commit f149c25c) -
Use ProGuard config files from .aar files.
(Issue #3752,
PR #5310,
Commit c537dd28) -
Pass
hybrid
to AOT, if enabled
(Issue #7088,
PR #7263,
Commit 92c290be)
Runtime Optimizations
-
Enable lazy loading of AOT'd assemblies
(Issue #6935,
PR #6940,
Commit 6dc426f1)Lazily load AOT'd assemblies and their associated
.so
native libraries.
This can improve app startup times, and is enabled by default.This can be disabled by setting the
$(AndroidAotEnableLazyLoad)
MSBuild property to False. -
Bump to lz4/lz4@5ff83968 [v1.9.4]
(PR #7262,
Commit 0a9d7451)lz4 is used as part of assembly compression. This bump includes faster
decompression speed (~20%) on aarch64 platforms. -
Speed up java-to-managed typemap lookups
(PR #6905,
Commit f48b97cb) -
Call
JNIEnv.Initialize()
directly, via function pointer
(PR #6880,
Commit 16680700)Helps improve app startup.
Debugger
- Trying to fix debug 2 assemblies with similar names
(Issue #7089,
PR #7113,
Commit 40930d0b)
Mono.Android
-
Fix custom validation callback for server certificates in HTTP handlers
(PR #6665,
Commit 48540d69)Fix the
AndroidMessageHandler.ServerCertificateCustomValidationCallback
property so that it is actually used
and usable on .NET 7. -
Optional NTLMv2 support in AndroidMessageHandler
(PR #6999,
Commit f348163b)Add support for a new
$(AndroidUseNegotiateAuthentication)
MSBuild property.
WhenTrue
, theXamarin.Android.Net.AndroidMessageHandler
type will support
NTLMv2 authentication. This authentication method
is recommended only for legacy services that do not provide any more
secure options.If an endpoint requires NTLMv2 authentication and NTMLv2 is not
enabled, then the endpoint will return HTTP-401 errors.
Templates
-
use .NET logo on app icons
(Issue #7041,
PR #7065,
Commit 226d7502) -
Add
androidwear
template for Android Wear OS
(PR #7013,
Commit e4fd84a2)