dotnet / android

.NET for Android provides open-source bindings of the Android SDK for use with .NET managed languages such as C#
MIT License
1.93k stars 532 forks source link

Improve XA0141 warning #9544

Open jpobst opened 9 hours ago

jpobst commented 9 hours ago

.NET 9.0.100

The NuGet package information in the XA0141 warning seems helpful, but it doesn't appear to actually work.

Repro:

dotnet new android
dotnet add package Xamarin.GooglePlayServices.Vision.Face.Contour.Internal --version 116.1.0.19
dotnet build -c Release

results in:

warning XA0141: NuGet package '<unknown>' version '<unknown>' contains a shared library 'libface_detector_v2_jni.so' which is not correctly aligned. See https://developer.android.com/guide/practices/page-sizes for more details
warning XA0141: NuGet package '<unknown>' version '<unknown>' contains a shared library 'libface_detector_v2_jni.so' which is not correctly aligned. See https://developer.android.com/guide/practices/page-sizes for more details

We should:

An updated example:

warning XA0141: NuGet package 'Xamarin.GooglePlayServices.Vision.Face.Contour.Internal' version '116.1.0.19' contains a shared library 'arm64-v8a/libface_detector_v2_jni.so' which is not 16KB aligned. Google may require 16KB aligned libraries in the future. See https://developer.android.com/guide/practices/page-sizes for more details.