Skip to content

Conversation

@madsodgaard
Copy link
Contributor

@madsodgaard madsodgaard commented Oct 12, 2025

This has the bare minimum changes needed to make the project work on Android.

I have tested it with the upcoming official Android SDK and works 👍

Credit should be given to #144

@ktoso ktoso merged commit 5cd11e5 into swiftlang:main Oct 13, 2025
38 checks passed
@lhoward
Copy link
Contributor

lhoward commented Oct 14, 2025

Notes:

  • JavaKit: Passing objects between threads #157 is not addressed; this will cause issues in any complex Android application that passes objects between threads
  • if you target the correct NDK version you should be able to link against libnativehelper.so rather than dynamically loading it (cc @finagolfin)

@ktoso
Copy link
Collaborator

ktoso commented Oct 14, 2025

For

if you target the correct NDK version you should be able to link against libnativehelper.so rather than dynamically loading it (cc @finagolfin)

Would you mind filing a new issue please @lhoward ?

@madsodgaard
Copy link
Contributor Author

madsodgaard commented Oct 14, 2025

  • if you target the correct NDK version you should be able to link against libnativehelper.so rather than dynamically loading it (cc @finagolfin)

I think you mean Android SDK and not NDK, right? The libnativehelper functions were exported in API 31. And we can't do conditionally linking based on version via SwiftPM unfortunately.

@lhoward
Copy link
Contributor

lhoward commented Oct 14, 2025

I do probably mean that, Android development details have been swapped out of my brain :) Anyway, if you need to dynamically load it, so be it.

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.

3 participants