fix: support building Android APK on Apple Silicon Macs#457
Merged
m1sterc001guy merged 1 commit intoMay 21, 2026
Conversation
Docker builds on Apple Silicon (arm64) failed due to three issues: 1. appimagetool-x86_64.AppImage cannot execute under Rosetta inside Docker containers (Exec format error). Added SKIP_APPIMAGETOOL build arg so Apple Silicon hosts skip this step; CI (amd64) is unaffected. 2. Android NDK toolchain is linux-x86_64 and must run under linux/amd64. Added --platform linux/amd64 to docker build and docker run so Docker uses Rosetta to translate x86_64 binaries on Apple Silicon hosts. 3. libc6-dev-i386 is x86-only — resolved by the platform fix above. Also fixed two pre-existing script bugs: - Stale .dart_tool.host directory caused mv to fail on retry builds - Flutter build/ artifacts from host embed /Users/... paths that are incompatible with Docker's /workspace mount; now cleaned before build Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
70e1a97 to
daf2db3
Compare
m1sterc001guy
approved these changes
May 21, 2026
m1sterc001guy
left a comment
Collaborator
There was a problem hiding this comment.
Thanks for the fix! We don't have a ton of contributors building on macs so understandable if we missed something there. I re-tested on my machine (linux) and nothing is broken, so let's merge.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Docker builds on Apple Silicon (arm64) failed due to three issues:
appimagetool-x86_64.AppImage cannot execute under Rosetta inside Docker containers (Exec format error). Added SKIP_APPIMAGETOOL build arg so Apple Silicon hosts skip this step; CI (amd64) is unaffected.
Android NDK toolchain is linux-x86_64 and must run under linux/amd64. Added --platform linux/amd64 to docker build and docker run so Docker uses Rosetta to translate x86_64 binaries on Apple Silicon hosts.
libc6-dev-i386 is x86-only — resolved by the platform fix above.
Also fixed two pre-existing script bugs: