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 drone 推送镜像时候 purge: true 推送完毕后没有删除对应的镜像,手动拷贝到服务器执行结果正确在样才能让指令自动执行成功删除对应镜像,如何解决?
  • ¥15 求daily translation(DT)偏差订正方法的代码
  • ¥15 js调用html页面需要隐藏某个按钮
  • ¥15 ads仿真结果在圆图上是怎么读数的
  • ¥20 Cotex M3的调试和程序执行方式是什么样的?
  • ¥20 java项目连接sqlserver时报ssl相关错误
  • ¥15 一道python难题3
  • ¥15 牛顿斯科特系数表表示
  • ¥15 arduino 步进电机
  • ¥20 程序进入HardFault_Handler