diff --git a/Documentation/docs-mobile/messages/xa0141.md b/Documentation/docs-mobile/messages/xa0141.md index 0153f62b569..32421c5d3bd 100644 --- a/Documentation/docs-mobile/messages/xa0141.md +++ b/Documentation/docs-mobile/messages/xa0141.md @@ -1,14 +1,28 @@ --- title: .NET for Android warning XA0141 description: XA0141 warning code -ms.date: 07/22/2024 +ms.date: 01/08/2025 --- # .NET for Android warning XA0141 ## Issue -NuGet package '{0}' version '{1}' contains a shared library '{2}' which is not correctly aligned. See https://developer.android.com/guide/practices/page-sizes for more details +Future versions of Android on arm64 will require that native libraries use 16 KB page sizes. +This requires that the mentioned native libraries be recompiled, and all apps using those +native libraries be rebuilt to contain the fixed versions of the native libraries. + +See the Android SDK [Support 16 KB page sizes](https://developer.android.com/guide/practices/page-sizes) +documentation for more information. ## Solution -The indicated native shared library must be recompiled and relinked with the 16k alignment, as per URL indicated in the message. +The indicated native shared library must be recompiled and relinked with the 16k alignment, as per +the Android SDK [Support 16 KB page sizes](https://developer.android.com/guide/practices/page-sizes) +documentation. + +## Example messages + +> warning XA0141: Android 16 will require 16 KB page sizes, Shared library 'libface_detector_v2_jni.so' does not have a 16 KB page size. +> Please inform the authors of the NuGet package 'Xamarin.GooglePlayServices.Vision.Face.Contour.Internal' version '116.1.0.19' +> which contains 'lib/net8.0-android34.0/play-services-vision-face-contour-internal.aar'. +> See https://developer.android.com/guide/practices/page-sizes for more details. diff --git a/src/Xamarin.Android.Build.Tasks/Microsoft.Android.Sdk/targets/Microsoft.Android.Sdk.AndroidLibraries.targets b/src/Xamarin.Android.Build.Tasks/Microsoft.Android.Sdk/targets/Microsoft.Android.Sdk.AndroidLibraries.targets index 7d9f0e930a7..14b9e8c2dee 100644 --- a/src/Xamarin.Android.Build.Tasks/Microsoft.Android.Sdk/targets/Microsoft.Android.Sdk.AndroidLibraries.targets +++ b/src/Xamarin.Android.Build.Tasks/Microsoft.Android.Sdk/targets/Microsoft.Android.Sdk.AndroidLibraries.targets @@ -23,7 +23,7 @@ projects. <_AarSearchDirectory Include="@(_ReferencePath->'%(RootDir)%(Directory)')" /> <_AarSearchDirectory Include="@(_ReferenceDependencyPaths->'%(RootDir)%(Directory)')" /> <_AarDistinctDirectory Include="@(_AarSearchDirectory->Distinct())" /> - <_AarFromLibraries Include="%(_AarDistinctDirectory.Identity)*.aar" /> + <_AarFromLibraries Include="%(_AarDistinctDirectory.Identity)*.aar" NuGetPackageId="%(_AarDistinctDirectory.NuGetPackageId)" NuGetPackageVersion="%(_AarDistinctDirectory.NuGetPackageVersion)"/>