From 183858b69a495d97e98f3ea5b192d921a406812a Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sun, 12 Apr 2026 16:40:33 +0000 Subject: [PATCH] fix(android): resolve APK installation failure on Android 16 This commit addresses the "Attempt to get length of null array" error during APK installation on Android 16 (API 36) by broadening the .NET 10 native asset misclassification fix in osu.Android.props to include ResolvedFileToPublish. Additionally: - Updates PatchElfPageSize.targets to ensure local libraries in osu.Android/libs/ are patched to 16KB page alignment. - Enables default debug signing for "unsigned" workflow builds to ensure generated APKs are installable on modern devices while still being distinct from production-signed builds. --- .github/workflows/release.yml | 3 +-- build/PatchElfPageSize.targets | 7 ++++--- osu.Android.props | 8 ++++++-- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c80e599c0951..a0b1d7f9ae10 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -104,7 +104,7 @@ jobs: -p:AndroidSigningKeyPass=${{ secrets.ANDROID_SIGNING_KEY_PASSWORD }} -p:AndroidSigningStorePass=${{ secrets.ANDROID_SIGNING_STORE_PASSWORD }} - - name: Build Android APK (unsigned) + - name: Build Android APK (signed with default debug key) if: steps.keystore.outputs.has_keystore != 'true' run: > dotnet publish -c Release -p:PublishTrimmed=false -p:AndroidLinkMode=None @@ -113,7 +113,6 @@ jobs: -p:Version=${{ steps.version.outputs.version }} -p:ApplicationDisplayVersion=${{ steps.version.outputs.version }} -p:ApplicationVersion=${{ github.run_number }} - -p:AndroidKeyStore=false - name: Find APK id: find_apk diff --git a/build/PatchElfPageSize.targets b/build/PatchElfPageSize.targets index 9be15f4da475..f29ae542eb77 100644 --- a/build/PatchElfPageSize.targets +++ b/build/PatchElfPageSize.targets @@ -265,10 +265,11 @@ finally Patches any 64-bit .so in the NuGet cache that has sub-16 KB LOAD alignment. The patch is idempotent — already-aligned files are skipped. --> - + - <_NuGetNativeLibs Include="$(NuGetPackageRoot)/**/runtimes/android-*/native/*.so" /> + <_NativeLibs Include="$(NuGetPackageRoot)/**/*.so" /> + <_NativeLibs Include="$(MSBuildThisFileDirectory)../osu.Android/libs/**/*.so" /> - + diff --git a/osu.Android.props b/osu.Android.props index dbe5612a2553..3cbfac087ca2 100644 --- a/osu.Android.props +++ b/osu.Android.props @@ -42,12 +42,16 @@ true - - + + native + + native +