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
Context: https://developer.android.com/about/versions/12/12L
Context: https://android-developers.googleblog.com/2021/12/beta-1-update-for-12l-feature-drop.html
Android 12L Developer Beta 1 has been released.
* [API diff vs. API-31][0]
* [API diff vs. Sv2 DP1][1]
The Android 12L Developer Preview Program Overview
[Timeline and updates][2] section suggests the following timeline
(which differs from ef01121):
* October: Developer Preview 1
* December: Beta 1; Final APIs (previously expected in Beta 2)
* January: Beta 2; Incremental beta update
* February: Beta 3; Incremental beta update
* Q1 2022: Final release
In particular, Beta 1 has "Final APIs". We now have API-32!
Enumify API-32, and declare it stable.
As a change from "upstream Google", Classic Xamarin.Android uses
`$(TargetFrameworkVersion)`=v12.1 for API-32, as there is no way to
express "12L" in a `System.Version`. We have decreed 12.1 as 12L.
.NET SDK for Android uses `$(TargetFramework)`=net6.0-android32.0.
However, we don't want to change the default API level for .NET 6
projects; the default will remain `net6.0-android31.0` (API-31),
using the [31.0.101-preview.11.117 binaries on NuGet.org][3].
This requires various changes to the unit test infrastructure and
.NET SDK workflow package creation.
Additionally, `d8` doesn't appear to support API-32 yet (?!);
building an app with an `AndroidManifest.xml` containing:
<uses-sdk android:minSdkVersion="32" android:targetSdkVersion="32" />
would use `d8 --min-api 32`, which results in a warning:
D8 : warning : An API level of 32 is not supported by this compiler.
Please use an API level of 31 or earlier
Update the `XASdkTests.SupportedOSPlatformVersion()` test so that it
only uses API-31 and not API-32. This avoids the above warning.
Finally, we had to update xaprepare to install the new
Android SDK Build-tools version 32.0.0, as `aapt` from previous
Build-tools versions would emit a warning when building for API-32:
Xamarin.Android.Aapt2.targets(157,3): warning APT2000: aapt2 W 01-05 23:58:06 8352 43857 LoadedArsc.cpp:657] Unknown chunk type '200'.
Unfortunately, installing Build-tools 32.0.0 promptly broke unit
tests using `$(AndroidDexTool)`=dx, with:
COMPILETODALVIK : error : Unable to access jarfile C:\…\android-toolchain\sdk\build-tools\32.0.0\lib\dx.jar
as Build-tools 31 and later no longer contains `lib/dx.jar`. Update
xaprepare to install *both* Build-tools 30.0.3 *and* 32.0.0, so that
tests which require `dx.jar` continue to run, and we can get *some*
test coverage against Build-tools 32.
Co-authored-by: Jonathan Peppers <jonathan.peppers@microsoft.com>
[0]: https://developer.android.com/sdk/api_diff/32/changes
[1]: https://developer.android.com/sdk/api_diff/32-incr/changes
[2]: https://web.archive.org/web/20220113142518/https://developer.android.com/about/versions/12/12L/overview
[3]: https://www.nuget.org/packages/Microsoft.Android.Ref.31/31.0.101-preview.11.117
Copy file name to clipboardExpand all lines: build-tools/Xamarin.Android.Tools.BootstrapTasks/Xamarin.Android.Tools.BootstrapTasks/CheckApiCompatibility.cs
+1-1
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,7 @@ public sealed class CheckApiCompatibility : Task
Copy file name to clipboardExpand all lines: build-tools/Xamarin.Android.Tools.BootstrapTasks/Xamarin.Android.Tools.BootstrapTasks/GenerateSupportedPlatforms.cs
+7-1
Original file line number
Diff line number
Diff line change
@@ -31,9 +31,15 @@ public class GenerateSupportedPlatforms : Task
31
31
[Required]
32
32
publicintMinimumApiLevel{get;set;}
33
33
34
+
/// <summary>
35
+
/// Default value for $(TargetPlatformVersion), defaults to MaxStableVersion.ApiLevel
0 commit comments