sentry-dotnet icon indicating copy to clipboard operation
sentry-dotnet copied to clipboard

Support 16kb page size on Android 15

Open tranb3r opened this issue 1 year ago • 2 comments

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.

tranb3r avatar Oct 10 '24 10:10 tranb3r

Awesome, thanks for reporting @tranb3r !

jamescrosswell avatar Oct 10 '24 21:10 jamescrosswell

We're depending on https://github.com/getsentry/sentry-java/issues/3657 to update the underlying Android SDK & NDK integration.

bitsandfoxes avatar Oct 11 '24 08:10 bitsandfoxes

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 avatar Nov 17 '24 12:11 HavenDV

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.

jamescrosswell avatar Nov 17 '24 20:11 jamescrosswell

Duplicate of https://github.com/getsentry/sentry-dotnet/issues/3633

jamescrosswell avatar Nov 17 '24 20:11 jamescrosswell