使用 gomobile 为 iOS/Android 构建 SDK |
您所在的位置:网站首页 › gomobile下载 › 使用 gomobile 为 iOS/Android 构建 SDK |
使用 gomobile 为 iOS/Android 构建 SDK
舌尖上的大胖
· · 3155 次点击 ·
·
开始浏览
这是一个创建于 的文章,其中的信息可能已经有所发展或是发生改变。
第一次,站长亲自招 Gopher 了>>>
一、安装
# 安装 gomobile
$ go get golang.org/x/mobile/cmd/gomobile
# 安装 gobind
$ go get golang.org/x/mobile/cmd/gobind
注意: 安装过程受 $GOPATH 影响,主要有两点: 1、$GOPATH 不是单一路径,可以指定多个路径,对于要编译的工程,也需要把工程目录加入 $GOPATH 2、编译器在编译时,会根据 $GOPATH 中的目录逐个搜索 3、如果需要,可以把安装的可执行工具目录加入 $PATH 以方便执行 在安装 gomobile 的时候,会安装到 $GOPATH 的一个路径中。如果 $GOPATH 只指定了工程目录,那么 gomobile 会安装到工程目录。所以需要根据需要指定 $GOPATH。 二、编译 $ gomobile bind -target ios/android 包名手机端集成后编译即可。 相关命令及帮助: gomobile bind 用于构建 SDK $ gomobile help bind gomobile build 用于构建 App $ gomobile help build 三、参考golang / go - Wiki - Mobile Golang环境搭建以及gomobile开发Android、ios的第三方库 Go Documentation - gomobile Go Documentation - gobind Calling Go code from Swift on iOS and vice versa with Gomobile (完) 有疑问加站长微信联系(非本文作者) 本文来自:简书 感谢作者:舌尖上的大胖 查看原文:使用 gomobile 为 iOS/Android 构建 SDK 入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889 3155 次点击 加入收藏 微博 赞 |
今日新闻 |
推荐新闻 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |