I'm following the official guide to install gomobile. I have Android Studio installed and via the Android Studio SDK manage installed NDK (side by side)
and all the SDK packages. Android Studio has no problem compiling and deploying my normal Android apps to me device.
I ran successfully (by which I mean without any errors):
go env -w GO111MODULE=auto
gomobile init
go get -d golang.org/x/mobile/example/basic
Then I ran:
gomobile build -target=android golang.org/x/mobile/example/basic
And got the error:
gomobile: no Android NDK found in $ANDROID_HOME/ndk-bundle nor in $ANDROID_NDK_HOME
When I run as suggested in the answer to another older thread:
gomobile init -ndk C:\Users\Christian\AppData\Local\Android\Sdk\ndk-bundle
I get:
flag provided but not defined: -ndk
usage: gomobile init [-openal dir]
What do I need to do to fix this?