This is a creation in Article, where the information may have evolved or changed.
Go is a simple and efficient language, the Go 1.4 version supports running on Android
Go get golang.org/x/mobile
Go get golang.org/x/mobile/example
Run the sample code with the path $gopath/src/Golang.org/x/mobile/example/libhello
Run All.bash compile and package the installation
If error:
Go build runtime:android/arm must be bootstrapped using Make.bash
It means that you do not compile the arm version of Go and need to go to $goroot/src to compile the android/arm version
#拣出一套交叉编译工具 $NDK _root/build/tools/make-standalone-toolchain.sh--platform=android-9--install-dir= $NDK _tool# Compile Android/arm support package sudo cc_for_target= $NDK _tool/ndk-toolchain/arm-linux-androideabi/bin/gcc cgo_enabled=1 GOOS= Android Goarch=arm goarm=7./make.bash
And then go back to the sample code to execute All.bash to successfully compile the APK