Closed
Description
What version of Go are you using (go version
)?
$ go version go version go1.13.10 darwin/amd64
Does this issue reproduce with the latest release?
It should.
What operating system and processor architecture are you using (go env
)?
go env
Output
$ go env GO111MODULE="on" GOARCH="amd64" GOBIN="" GOCACHE="/Users/user/Library/Caches/go-build" GOENV="/Users/user/Library/Application Support/go/env" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="darwin" GONOPROXY="" GONOSUMDB="" GOOS="darwin" GOPATH="/Users/tomisin.jenrola/go" GOPRIVATE="" GOPROXY="https://proxy.server" GOROOT="/usr/local/Cellar/[email protected]/1.13.10_1/libexec" GOSUMDB="sum.golang.org" GOTMPDIR="" GOTOOLDIR="/usr/local/Cellar/[email protected]/1.13.10_1/libexec/pkg/tool/darwin_amd64" GCCGO="gccgo" AR="ar" CC="clang" CXX="clang++" CGO_ENABLED="1" GOMOD="/path/to/project/go/go.mod" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/.../go-build183346344=/tmp/go-build -gno-record-gcc-switches -fno-common"
What did you do?
I ran gomobile bind -target=android -v github.com/example/package
What did you expect to see?
Output for binding. The use of the _HOME
suffix has been deprecated as per this dev doc and this thread. The current suffix is _ROOT
.
Temporarily I have this in my ~/.bash_profile
:
export ANDROID_SDK_ROOT="$HOME/Library/Android/sdk"
export ANDROID_NDK_ROOT="$ANDROID_SDK_ROOT/ndk/21.3.6528147"
# for gomobile only
export ANDROID_HOME=$ANDROID_SDK_ROOT
export ANDROID_NDK_HOME=$ANDROID_NDK_ROOT
What did you see instead?
Before setting ANDROID_NDK_HOME
gomobile: no Android NDK found in $ANDROID_HOME/ndk-bundle nor in $ANDROID_NDK_HOME
Before setting ANDROID_HOME
gomobile: this command requires ANDROID_HOME environment variable (path to the Android SDK)