Support 32-bit ARM Android via a separate Mono bundle#2340
Conversation
.NET 10 defaults Android to the CoreCLR runtime, which only ships 64-bit runtime packs, so the published AAB dropped armeabi-v7a and 32-bit devices became "incompatible" on the Play Store. Build a second Mono/armeabi-v7a bundle alongside the CoreCLR 64-bit one; both go to a single Play listing, version-code-banded (CoreCLR above Mono) so 64-bit devices -- which also report armeabi-v7a support -- always resolve to CoreCLR and only 32-bit-only devices fall through to Mono. - fw-lite.yaml: publish-android is now a coreclr/mono build matrix; create-release stages both bundles under per-arch asset names. - FwLiteMaui.csproj: default RuntimeIdentifiers trimmed to the 64-bit set CoreCLR supports; arm32 builds with -p:UseMonoRuntime=true -p:RuntimeIdentifiers=android-arm. - Troubleshooting dialog shows the process architecture (Arm/Arm64) so you can confirm which bundle a device installed. - Add install-maui-android-release-arm32 task for on-device testing. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
UI unit Tests 1 files 62 suites 29s ⏱️ Results for commit 8ccd3a3. ♻️ This comment has been updated with latest results. |
The Troubleshoot dialog's $t`Architecture` is a new translatable message; CI fails the build if `pnpm i18n:extract` would add any msgid, so run it and commit the resulting catalog entries (English fallback in en.po, empty in the others). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Argos notifications ↗︎
|
C# Unit Tests165 tests 165 ✅ 18s ⏱️ Results for commit 8ccd3a3. ♻️ This comment has been updated with latest results. |
… dialog spacing The Mono/arm32 size-optimizing trimmer can reduce SqlTransparentExpression's static ctor to a no-op (nop/ret) before the patcher runs -- the exact shape the patcher itself produces -- which tripped its "stsfld _ctor required" guard and broke the build. - Linq2DbCctorPatcher: accept a no-op cctor as already-neutralised instead of failing; guard the _ctor field directly (the real hazard) and still replace Quote() with a throw in all accepted shapes. Makes the patcher idempotent. - install-maui-android-release-arm32: use -t:Run (full build -> install -> launch graph, targets the USB device) instead of -t:SignAndroidPackage. - TroubleshootDialog: lay the version/Platform/Architecture rows out as flex children (gap-1) so their spacing is uniform. Known related issue (not fixed here, clean builds unaffected): stale .cctor-patched sentinels can make the MSBuild patch target skip a regenerated dll on dirty incremental builds, letting an unpatched dll reach AOT. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…iers The publish-android matrix passed -p:RuntimeIdentifiers on the command line, which is a global property and broke the SDK's per-RID fan-out: - coreclr leg: the ';' in android-arm64;android-x64 was read as a property separator -> MSB1006 "Switch: android-x64". - mono leg: dependency projects didn't get the singular RuntimeIdentifier -> MSB3030 missing release_android-arm/<dep>.dll. Move the RID list into FwLiteMaui.csproj keyed on UseMonoRuntime, and have CI pass only the runtime flag. Also tighten Troubleshoot dialog row spacing (the CopyButton was inflating the version row height). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The cctor-patcher tolerance for a trimmer-neutralised (no-op) cctor only mattered for polluted incremental builds. Clean builds (CI) take the normal stsfld path -- the CI failures were always the RID issue (MSB1006/MSB3030), never the patcher -- so the original deliberately-loud guard is fine as-is. Also trim/dedupe the comments added for the arm32 work (the RID/fan-out rationale now lives once, in FwLiteMaui.csproj). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
I'm not sure why this makes the app work on your tablet. But according to the google play store our app currently supports armeabi-v7a and it has since before we upgraded to dotnet 10.
however according to the docs that's not true, it is possible to opt in, but it's not the default. according to their docs you can even open up the apk and look in libs, if there's a libmono then it's mono, and if there's a libcoreclr then it's coreCLR. As a last check, I just confirmed that both of the apps output in this PR uses libmono. So I'm not sure why this fixed anything on your tablet. |
| The Mac App Store will NOT accept apps with ONLY maccatalyst-arm64 indicated; | ||
| either BOTH runtimes must be indicated or ONLY macatalyst-x64. --> | ||
| <!-- For example: <RuntimeIdentifiers>maccatalyst-x64;maccatalyst-arm64</RuntimeIdentifiers> --> | ||
| <RuntimeIdentifiers Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">android-arm;android-arm64;android-x86;android-x64</RuntimeIdentifiers> |
There was a problem hiding this comment.
did you mean to drop android-x86?
Summary
.NET 10 defaults Android to CoreCLR, whose runtime packs are 64-bit-only, so the published AAB dropped
armeabi-v7aand 32-bit devices show up as "incompatible". This change builds a second Mono /armeabi-v7abundle alongside the CoreCLR 64-bit one and ships both to a single Play listing. The two bundles are version-code-banded (CoreCLR above Mono) so 64-bit devices resolve to the CoreCLR bundle and only 32-bit-only devices fall through to Mono. A process-architecture readout is added to the Troubleshoot dialog.Caveats reviewers must know
versionCodebanded above Mono). The Troubleshoot dialog now shows Arm / Arm64 so you can confirm in the field which bundle a device actually installed.