Go for Android
First, you should write a program at ~/go/github/yingshaoxo/hi/main.go
~/go/github/yingshaoxo/hi/main.gopackage greeting
func SayHi() string {
return "Hi!"
}Then, compile it to binary file
go get golang.org/x/mobile/cmd/gomobile
gomobile initgomobile bind -target=androidLet's import it to Android Studio Project
Let's use it with the following codes
The real codes
Last updated