Skip to content

Android: one ABI per release APK - #105

Merged
keyldev merged 1 commit into
mainfrom
fix/apk-single-abi
Nov 3, 2026
Merged

keyldev merged 1 commit into
mainfrom
fix/apk-single-abi

Conversation

@compot-dev

Copy link
Copy Markdown
Collaborator

Each publish step now passes -p:RuntimeIdentifiers=<rid>: the csproj lists both RIDs and .NET Android packs every listed one regardless of -r, so both v0.3.20 APKs held arm64-v8a and x86_64 (70982410 bytes each). Now 36.7 MB (arm64) and 38.1 MB (x64). The verify step also fails the job if an APK holds another ABI (on the v0.3.20 APKs it stops with arm64 APK ABIs: arm64-v8a x86_64). The x64 APK runs on an Android TV 16 emulator.

Fixes #101

Both release APKs carried arm64-v8a and x86_64 (v0.3.20: 70982410 bytes
each, 257 libraries per ABI in each). The csproj lists
RuntimeIdentifiers=android-arm64;android-x64, and .NET Android packs every
listed RID into the APK whatever -r says.

Each publish step now also passes -p:RuntimeIdentifiers=<rid>, so the arm64
APK holds only arm64-v8a and the x64 one only x86_64: 36.7 MB and 38.1 MB
locally instead of 71 MB. The verify step now fails the job if an APK holds
any other ABI; run against the v0.3.20 APKs it stops at
"arm64 APK ABIs: arm64-v8a x86_64".

Fixes #101
@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Summary by Qodo

Package one Android ABI per release APK

🐞 Bug fix 🕐 Less than 10 minutes

Grey Divider

AI Description

• Override the project's multi-RID setting for each publish so APKs contain only their intended ABI.
• Fail the Android job if either APK contains an unexpected ABI, preventing oversized releases.
Diagram

graph TD
  Config["Android project"] --> ArmPublish["Arm64 publish"] --> ArmApk["Arm64 APK"] --> Gate{"Integrity and ABI gate"} --> Artifacts["Release artifacts"]
  Config --> X64Publish["X64 publish"] --> X64Apk["X64 APK"] --> Gate
Loading
High-Level Assessment

Keep the explicit per-publish RID override and artifact check. Changing the project's shared multi-RID setting would affect other builds; the workflow-local fix targets release packaging directly.

Files changed (1) +9 / -2

Bug fix (1) +9 / -2
build.ymlRestrict and verify the ABI in each Android release APK +9/-2

Restrict and verify the ABI in each Android release APK

• Each Android publish command now overrides RuntimeIdentifiers with its target RID, preventing both ABIs from being packaged together. The existing integrity step also checks each APK's library ABI directories and fails before artifact upload if they differ from the expected ABI.

.github/workflows/build.yml

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Tip of the day
💡 Did you know, you can copy the agent prompt from any finding and feed it to your IDE agent

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

@keyldev
keyldev merged commit ff816f9 into main Nov 3, 2026
6 checks passed
@compot-dev
compot-dev deleted the fix/apk-single-abi branch November 4, 2026 10:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Android: both release APKs contain both ABIs

2 participants