Dom
Dom

Reputation: 13

Can't run golang mobile package given examples

I was trying to test golang mobile package given examples(https://godoc.org/golang.org/x/mobile/example), but unfortunatly i get some errors:

C:\Users\D\Documents\gocode\src\golang.org\x\mobile\example\flappy>go run main.go
# golang.org/x/mobile/gl
..\..\gl\gl.go:1683: undefined: context3
..\..\gl\gl.go:1695: undefined: context3
..\..\gl\gl.go:1707: undefined: context3
..\..\gl\gl.go:1719: undefined: context3
..\..\gl\gl.go:1731: undefined: context3
..\..\gl\gl.go:1743: undefined: context3
..\..\gl\gl.go:1755: undefined: context3
..\..\gl\gl.go:1773: undefined: context3
..\..\gl\gl.go:1783: undefined: context3
..\..\gl\gl.go:1794: undefined: context3
..\..\gl\gl.go:1794: too many errors

For mobile package install, i wrote only go get golang.org/x/mobile command, i am using go1.6.2 windows/amd64 go version.

Upvotes: 1

Views: 252

Answers (1)

Melih Mucuk
Melih Mucuk

Reputation: 7066

If you want to generate apk for testing, you should run command below:

gomobile build -target=android golang.org/x/mobile/example/flappy

more info can be found here

Upvotes: 1

Related Questions