Skip to content

Add Android support#136

Draft
stackotter wants to merge 13 commits intomainfrom
stackotter/android_support
Draft

Add Android support#136
stackotter wants to merge 13 commits intomainfrom
stackotter/android_support

Conversation

@stackotter
Copy link
Collaborator

@stackotter stackotter commented Jan 16, 2026

This is a WIP. I'll fill out the description once things are bit more complete.

Todo

  • Resolve Android Swift SDK path ourself, cause SwiftPM isn't good at choosing when there are multiple Android SDKs installed, and it doesn't ensure that the SDK was built with the toolchain currently being used. If we also implement Swift toolchain discovery, then we could probably automatically locate valid toolchain/Android Swift SDK combinations in most valid setups.
  • Support metadata insertion on Android (requires being able to locate SDKs ourselves).
  • APK bundling
  • Make target Android API version configurable
  • Change target architecture to match target device
  • Support multi-arch Android APK builds
  • Automatically locate compatible Swift toolchains (because Swift Android SDKs are quite particular)

Future improvements

  • Update toolchain compatibility resolution to be two-way (i.e. if you provide a toolchain but no SDK, then we should take the toolchain into account when selecting an SDK)
  • Choose between multiple matching SDKs by eliminating any that don't have a corresponding compatible toolchain installed (rather than just picking the first one)

@stackotter stackotter force-pushed the stackotter/android_support branch from a32e5a9 to cf0f10e Compare January 16, 2026 04:49
Without this, the Android build system links with the absolute path
of the file on my laptop, which of course leads to a crash when run
on my Android device.
@stackotter stackotter force-pushed the stackotter/android_support branch from b9cf70e to 195ad4e Compare February 3, 2026 03:05
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.

1 participant