dongliu5475 2016-06-23 13:50
浏览 46
已采纳

给出的示例无法运行golang移动软件包

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.

  • 写回答

1条回答 默认 最新

  • douwei7203 2016-06-23 14:37
    关注

    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

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 如何让企业微信机器人实现消息汇总整合
  • ¥50 关于#ui#的问题:做yolov8的ui界面出现的问题
  • ¥15 如何用Python爬取各高校教师公开的教育和工作经历
  • ¥15 TLE9879QXA40 电机驱动
  • ¥20 对于工程问题的非线性数学模型进行线性化
  • ¥15 Mirare PLUS 进行密钥认证?(详解)
  • ¥15 物体双站RCS和其组成阵列后的双站RCS关系验证
  • ¥20 想用ollama做一个自己的AI数据库
  • ¥15 关于qualoth编辑及缝合服装领子的问题解决方案探寻
  • ¥15 请问怎么才能复现这样的图呀