Support 16kb page size on Android 15
Problem Statement
When building a dotnet android app for Android 15, referencing Sentry.Maui 4.12.1, I get the following warning message:
C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\35.0.0-rc.2.152\tools\Xamarin.Android.Common.targets(2113,3): warning XA0141: NuGet package '<unknown>' version '<unknown>' contains a shared library 'libsentry-android.so' which is not correctly aligned. See https://developer.android.com/guide/practices/page-sizes for more details [D:\Dev\Zitch\ouibank\OuiBank.Maui\O
uiBank.Maui.csproj::TargetFramework=net9.0-android35.0]
C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\35.0.0-rc.2.152\tools\Xamarin.Android.Common.targets(2113,3): warning XA0141: NuGet package '<unknown>' version '<unknown>' contains a shared library 'libsentry.so' which is not correctly aligned. See https://developer.android.com/guide/practices/page-sizes for more details [D:\Dev\Zitch\ouibank\OuiBank.Maui\OuiBank.M
aui.csproj::TargetFramework=net9.0-android35.0]
C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\35.0.0-rc.2.152\tools\Xamarin.Android.Common.targets(2113,3): warning XA0141: NuGet package '<unknown>' version '<unknown>' contains a shared library 'libsentrysupplemental.so' which is not correctly aligned. See https://developer.android.com/guide/practices/page-sizes for more details [D:\Dev\Zitch\ouibank\OuiBank.Ma
ui\OuiBank.Maui.csproj::TargetFramework=net9.0-android35.0]
Solution Brainstorm
From https://developer.android.com/about/versions/15/behavior-changes-all#16-kb
Beginning with Android 15, Android supports devices that are configured to use a page size of 16 KB (16 KB devices). If your app uses any NDK libraries, either directly or indirectly through an SDK, then you will need to rebuild your app for it to work on these 16 KB devices.
Libraries in sentry.bindings.android should be updated. Thanks.
Awesome, thanks for reporting @tranb3r !
We're depending on https://github.com/getsentry/sentry-java/issues/3657 to update the underlying Android SDK & NDK integration.
Any progress on this? It seems to be no longer blocked and with the release of .net 9 it is important as it is now the default Android 35
Any progress on this? It seems to be no longer blocked and with the release of .net 9 it is important as it is now the default Android 35
@HavenDV I think we must have dealt with this in a duplicate issue. This was addressed in the underlying native SDK in:
- https://github.com/getsentry/sentry-dotnet/pull/3527
And in the .NET SDK (that wraps that native SDK) in:
- https://github.com/getsentry/sentry-dotnet/pull/3723
The fix in the .NET SDK is on the version-5.0.0 branch, which is the one we're preparing that includes .NET 9.0 support. We should be able to make a public alpha release of that in the week or two.
Duplicate of https://github.com/getsentry/sentry-dotnet/issues/3633