profile
viewpoint

Ask questionsno Android NDK found in $ANDROID_HOME

$ go version

go version go1.14.1 linux/amd64

Ubuntu 19.04

  • Android studio 3.6.1

  • Run android SDKManager - > LLDB NDK Android SDK command line tool CMAKE

$ go get golang.org/x/mobile/cmd/gomobile

$ go get -d golang.org/x/mobile/example/basic

isurit@isurit:~/go/bin$ ./gomobile build -target=android golang.org/x/mobile/example/basic ./gomobile: no Android NDK found in $ANDROID_HOME/ndk-bundle nor in $ANDROID_NDK_HOME

isurit@isurit:~/go/bin$ ./gomobile version gomobile version +3c8601c Sat Feb 22 14:29:34 2020 +0000 (android); androidSDK=

isurit@isurit:~/go/bin$ echo $ANDROID_HOME

isurit@isurit:~/go/bin$ echo $ANDROID_NDK_HOME

--------------------------------->

i tried to add env for ANDROID

vi ~/.bashrc

export ANDROID_SDK=/home/isurit/Android/Sdk export ANDROID_NDK=/home/isurit/Android/Sdk/ndk/21.0.6113669 export PATH="$PATH:$ANDROID_SDK/tools:$ANDROID_SDK/platform-tools:$ANDROID_NDK"

source ~/.bashrc

isurit@isurit:~/go/bin$ ./gomobile version gomobile version +3c8601c Sat Feb 22 14:29:34 2020 +0000 (android); androidSDK= isurit@isurit:~/go/bin$ ./gomobile build -target=android golang.org/x/mobile/example/basic ./gomobile: no Android NDK found in $ANDROID_HOME/ndk-bundle nor in $ANDROID_NDK_HOME

it still didn't work. ; (

golang/go

Answer questions federicobond

For future reference, this probably works when setting ANDROID_NDK_HOME=/home/isurit/Android/Sdk/ndk/21.0.6113669 or whatever ndk version is installed in the ndk directory.

useful!
source:https://uonfu.com/
Github User Rank List