You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
These release notes are intended to call out interesting user-facing enhancements and changes as we build the next version of .NET for Android.
Note
The intention of previews is to try out changes and get feedback, so these changes could be altered or removed before the final .NET 10 release in November 2025.
Please file any feedback about these features as issues in this repository.
Android 36.1
To try out the new APIs, you can opt your project into the new net10.0-android36.1 target framework:
<ProjectSdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net10.0-android36.1</TargetFramework>
<EnablePreviewFeatures>true</EnablePreviewFeatures>
<!-- Remainder of your .csproj -->
Note that if omitted, net10.0-android will default to API 36.0. $(EnablePreviewFeatures) will not be required in future .NET 10 releases.
To use an Android 36.1-only API you can use the OperatingSystem class to check the Android version at runtime:
if(OperatingSystem.IsAndroidVersionAtLeast(36,1)){// Call some Android 36.1 API here}else{// Fallback for older OS versionsShowToast("Android 36.1+ is required for this feature");}
See the Android documentation for a full diff of the new available APIs in Android 36.1.
To install the Android 36.1 platform, you can go to Tools > Android > Android SDK Manager. Under the gear icon in the bottom right, change Repository to Full List. This allows you to install Android SDK Platform 36.1.
Use System.IO.Compression for .apk creation (#9623)
Historically, dotnet/android-libzipsharp was used to process ZIP archives and create .aab and .apk files.
For command-linedotnet build invocations, we now use System.IO.Compression.ZipArchive to create .aab and .apk files. This should result in faster build times.
Builds from within Visual Studio continue to use dotnet/android-libzipsharp, as the .NET Framework version of System.IO.Compression cannot be used.
Previously, the Android workload installed a copy of Mono.Android.dll per architecture, even though the contents of each of these files were identical.
This duplication has been removed, saving nearly 100MB of download size (compressed) and even more when uncompressed on disk.
Google has released Beta 3 of the Android 16 (API-36) SDK. Although technically still a "preview", the ABIs have been declared "stable" and thus we have completed our bindings and updated net10.0-android to target net10.0-android36.0. Google's "final" release of Android 16 is expected this summer.
API-36 is now the default, which means that when $(TargetFramework) is net10.0-android, API-36 will be used.
This will cause issues when using Visual Studio and Visual Studio Code with .NET 10, as Visual Studio and Visual Studio Code do not yet know about API-36, which will trigger an error XA5207.
To fix this, you will need to manually install the API-36 platform.jar into your Android SDK directory, or wait for a forthcoming update to Visual Studio.
Google has released Beta 1 of the Android 16 (API-36) SDK. Support has been adding for using these preview APIs.
To target the Android 16 preview API:
Use the Android SDK Manager to download the Android 16 (Baklava) Platform
Update your project's TargetFramework to net10.0-android36
Update Recommended Minimum Supported Android API (#9656)
The .NET for Android project templates have been updated to specify 24 ("Nougat") as the default $(SupportedOSPlatformVersion) instead of 21 ("Lollipop"). This prevents users from hitting "desugaring" runtime crashes when using Java default interface methods.
While API-21 is still supported in .NET 10, it is recommended to update existing projects to API-24 to avoid unexpected runtime errors.
Previously we could not support dotnet run for .NET for Android projects because it did not accept parameters needed to specify which Android device or emulator to use.
Now that the .NET SDK team has added this support, .NET for Android projects can be run using dotnet run:
// Run on the only attached Android physical device
dotnet run -p:AdbTarget=-d
// Run on the only running Android emulator
dotnet run -p:AdbTarget=-e
// Run on the specified Android physical device or emulator
dotnet run -p:AdbTarget="-s emulator-5554"
The AdbTarget property is passed to adb. Its specification is documented here.
A new way of creating the marshal methods needed for Java calling into C# code promises to provide startup performance improvements. Unfortunately, we weren't able to get them stabilized in time for .NET 9 and thus .NET 9 shipped with them off by default.
For .NET 10 previews we have re-enabled them by default to continue testing and getting feedback. Problems with these marshal methods often manifest as a hang at startup. If you are getting a hang on startup on .NET 10 previews that you didn't see on .NET 9, try disabling marshal methods. If this fixes the hang, please file an issue letting us know there are still issues with marshal methods.
Add ArtifactFilename metadata for @(AndroidMavenLibrary) item (#9479)
@(AndroidMavenLibrary) was added in .NET 9 and allows a Java library to be automatically downloaded from Maven to be bound. Generally this library is named {artifact.Id}-{artifact.Version}.[jar|aar], however we later found out it does not follow a standard and could be arbitrarily different.
Add the ArtifactFilename metadata to @(AndroidMavenLibrary) to allow an alternative file name:
Visual Studio Design-Time Builds no longer invoke aapt2 (#9700)
In order to speed up Design-Time Builds, aapt2 is no longer invoked; instead, the .aar files and underlying Android resources are parsed directly . This reduces the time of a Design-Time Build for some of our unit tests from over 2s to under 600ms.
Welcome to .NET for Android 10!
These release notes are intended to call out interesting user-facing enhancements and changes as we build the next version of .NET for Android.
Note
The intention of previews is to try out changes and get feedback, so these changes could be altered or removed before the final .NET 10 release in November 2025.
Please file any feedback about these features as issues in this repository.
Android 36.1
To try out the new APIs, you can opt your project into the new
net10.0-android36.1target framework:Note that if omitted,
net10.0-androidwill default to API 36.0.$(EnablePreviewFeatures)will not be required in future .NET 10 releases.To use an Android 36.1-only API you can use the
OperatingSystemclass to check the Android version at runtime:See the Android documentation for a full diff of the new available APIs in Android 36.1.
For a full sample using Android 36.1 APIs, see our Pdf Annotator sample on GitHub.
To install the Android 36.1 platform, you can go to Tools > Android > Android SDK Manager. Under the gear icon in the bottom right, change Repository to Full List. This allows you to install
Android SDK Platform 36.1..NET 10 Preview 4 - Released May 13, 2025
Full GitHub release notes
Use System.IO.Compression for
.apkcreation (#9623)Historically, dotnet/android-libzipsharp was used to process ZIP archives and create
.aaband.apkfiles.For command-line
dotnet buildinvocations, we now useSystem.IO.Compression.ZipArchiveto create.aaband.apkfiles. This should result in faster build times.Builds from within Visual Studio continue to use dotnet/android-libzipsharp, as the .NET Framework version of System.IO.Compression cannot be used.
Improved Download Size (#10038)
Previously, the Android workload installed a copy of
Mono.Android.dllper architecture, even though the contents of each of these files were identical.This duplication has been removed, saving nearly 100MB of download size (compressed) and even more when uncompressed on disk.
.NET 10 Preview 3 - Released Apr 10, 2025
Full GitHub release notes
Android 16 (Baklava) Beta 3 Bindings (#9914)
(PR #9814, Commit d5152b6a)
Google has released Beta 3 of the Android 16 (API-36) SDK. Although technically still a "preview", the ABIs have been declared "stable" and thus we have completed our bindings and updated
net10.0-androidto targetnet10.0-android36.0. Google's "final" release of Android 16 is expected this summer.API-36 is now the default, which means that when
$(TargetFramework)isnet10.0-android, API-36 will be used.This will cause issues when using Visual Studio and Visual Studio Code with .NET 10, as Visual Studio and Visual Studio Code do not yet know about API-36, which will trigger an error XA5207.
To fix this, you will need to manually install the API-36
platform.jarinto your Android SDK directory, or wait for a forthcoming update to Visual Studio.Android SDK Tool Updates
manifest-mergerfrom 31.8.1 to 31.9.0 (Bump com.android.tools.build:manifest-merger from 31.8.1 to 31.8.2 in /src/manifestmerger #9866)Improved .NET Aspire support
$(HttpActivityPropagationSupport)=falsein "Release"(PR #9933, Commit ba631530)
$(MetricsSupport)=falsein "Release"(PR #9928, Commit 8a1acdd4)
These should help improve .NET Aspire use in "Debug" configuration builds.
.NET 10 Preview 2 - Released Mar 18, 2025
Full GitHub release notes
Android 16 (Baklava) Beta 2 Bindings (#9814)
Google has released Beta 2 of the Android 16 (API-36) SDK. Support has been adding for using these preview APIs.
To target the Android 16 preview API:
TargetFrameworktonet10.0-android36.NET 10 Preview 1 - Released Feb 25, 2025
Full GitHub release notes
Android 16 (Baklava) Beta 1 Bindings (#9707)
Google has released Beta 1 of the Android 16 (API-36) SDK. Support has been adding for using these preview APIs.
To target the Android 16 preview API:
TargetFrameworktonet10.0-android36Update Recommended Minimum Supported Android API (#9656)
The .NET for Android project templates have been updated to specify
24("Nougat") as the default$(SupportedOSPlatformVersion)instead of21("Lollipop"). This prevents users from hitting "desugaring" runtime crashes when using Java default interface methods.While API-21 is still supported in .NET 10, it is recommended to update existing projects to API-24 to avoid unexpected runtime errors.
Support for
dotnet run(#9470)Previously we could not support
dotnet runfor .NET for Android projects because it did not accept parameters needed to specify which Android device or emulator to use.Now that the .NET SDK team has added this support, .NET for Android projects can be run using
dotnet run:The
AdbTargetproperty is passed toadb. Its specification is documented here.Enable Marshal Methods by Default (#9551)
A new way of creating the marshal methods needed for Java calling into C# code promises to provide startup performance improvements. Unfortunately, we weren't able to get them stabilized in time for .NET 9 and thus .NET 9 shipped with them off by default.
For .NET 10 previews we have re-enabled them by default to continue testing and getting feedback. Problems with these marshal methods often manifest as a hang at startup. If you are getting a hang on startup on .NET 10 previews that you didn't see on .NET 9, try disabling marshal methods. If this fixes the hang, please file an issue letting us know there are still issues with marshal methods.
Add
ArtifactFilenamemetadata for@(AndroidMavenLibrary)item (#9479)@(AndroidMavenLibrary)was added in .NET 9 and allows a Java library to be automatically downloaded from Maven to be bound. Generally this library is named{artifact.Id}-{artifact.Version}.[jar|aar], however we later found out it does not follow a standard and could be arbitrarily different.Add the
ArtifactFilenamemetadata to@(AndroidMavenLibrary)to allow an alternative file name:Visual Studio Design-Time Builds no longer invoke
aapt2(#9700)In order to speed up Design-Time Builds,
aapt2is no longer invoked; instead, the.aarfiles and underlying Android resources are parsed directly . This reduces the time of a Design-Time Build for some of our unit tests from over 2s to under 600ms.Building with JDK-21 is now supported (#9672)
.NET for Android projects can now be built with JDK-21.
generatoroutput now avoids potential System.Reflection.Emit usage (dotnet/java-interop#1275)Help optimize app startup and overall performance by removing codepaths that may hit System.Reflection.Emit from "Java calling into C#" codepaths.
Fix
InvalidCastExceptionwhen usingApplicationAttribute.ManageSpaceActivity(#9708)Trying to set the
ApplicationAttribute.ManageSpaceActivityproperty would result in an XAGJS7007 error. This has been fixed.