Skip to content

Instantly share code, notes, and snippets.

@fortuna
Last active September 4, 2025 00:23
Show Gist options
  • Save fortuna/017a2fc50b41e861233d49ffcbd77a2c to your computer and use it in GitHub Desktop.
Save fortuna/017a2fc50b41e861233d49ffcbd77a2c to your computer and use it in GitHub Desktop.
Using Go Mobile
# This adds the tools to go.mod under the tools section, and pins their version
go get -tool golang.org/x/mobile/cmd/gomobile golang.org/x/mobile/cmd/gobind
# This ensures gobind in in the path for gomobile.
PATH="$(dirname $(go tool -n gobind)):${PATH}" go tool gomobile bind --androidapi 21 .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment