Files
Ben SchwartzandHyang-Ah Hana Kim 8578da9835 all: modernize handling of Android SDK and NDK paths
This change removes Gomobile's dependency on ANDROID_HOME and
ANDROID_NDK_HOME.  Setting ANDROID_HOME is generally optional,
and ANDROID_NDK_HOME is deprecated.

This change also increases the minimum API version to 16, as
all SDKs that supported API 15 are now deprecated.

Fixes golang/go#52470

Change-Id: I546365774a089e5d7ae1be0a538efd72741d92ac
Reviewed-on: https://go-review.googlesource.com/c/mobile/+/401574
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Daniel Skinner <daniel@dasa.cc>
Reviewed-by: Suzy Mueller <suzmue@golang.org>
Reviewed-by: Hajime Hoshi <hajimehoshi@gmail.com>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
2022-05-18 20:53:45 +00:00

1.2 KiB

Ivy Big Number Calculator (Android)

Ivy (robpike.io/ivy) is an interpreter for an APL-like language written in Go. This repository hosts a minimal Android project used for its Android version.

How to build

Requirements

  • Go 1.17 or newer
  • Android SDK
  • Android NDK
  • golang.org/x/mobile/cmd/gomobile

The gomobile command respects the ANDROID_HOME and ANDROID_NDK_HOME environment variables. If gomobile can't find your SDK and NDK, you can set these environment variables to specify their locations:

export ANDROID_HOME=/path/to/sdk-directory
export ANDROID_NDK_HOME=/path/to/ndk-directory

From this directory, run:

  go install golang.org/x/mobile/cmd/gomobile@latest
  go install golang.org/x/mobile/cmd/gobind@latest

  # Make sure `gomobile` and `gobind` is in your `PATH`.
  gomobile bind -o app/ivy.aar robpike.io/ivy/mobile

Open this directory from Android Studio, and build.

robpike.io/ivy and golang.org/x/mobile are required dependencies of this main module. In order to update them:

  go get -d golang.org/x/mobile@latest
  go get -d robpike.io/ivy/mobile
  go mod tidy