总是 -bash: gomobile: 命令未找到 [英] Always -bash: gomobile: command not found

查看:186
本文介绍了总是 -bash: gomobile: 命令未找到的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在

/Users/GaryChan/go/bin/gomobile

我的项目是

/Users/GaryChan/go/src/abc.com/project

当我尝试在

/Users/GaryChan/go/src/abc.com/project/sdk

并运行:

export ANDROID_HOME=/Users/GaryChan/Library/Android/sdk/ndk-bundle/


gomobile bind -target=android  abc.com/project/sdk

我去安装去移动但无济于事.当我在我的 Mac 终端执行 gomobile 时,cmd 总是提示 -bash: gomobile: command not found

I go install go and go mobile but to no avail. When I execute gomobile at My Mac Terminal, the cmd always prompt -bash: gomobile: command not found

然后我无法导出 SDK.我该怎么办 ?

Then I cannot export the SDK. What should I do ?

https://godoc.org/golang.org/x/mobile/cmd/gomobile

更新:

Go 版本是:go 版本 go1.11.1 darwin/amd64

Go Version is : go version go1.11.1 darwin/amd64

推荐答案

确保 /Users/GaryChan/go/bin/ 在您的 $PATH 中.如果不是,请编辑您的 bash 配置文件以添加它.您的个人资料是您的主目录中名为 .profile.bash_profile 的文件.它应该包含这样一行:

Make sure /Users/GaryChan/go/bin/ is in your $PATH. If it's not, edit your bash profile to add it. Your profile is a file in your home directory named either .profile or .bash_profile. It should contain a line like this:

export PATH="${PATH}:/Users/GaryChan/go/bin/"

进行此更改,然后关闭您的终端窗口并打开一个新窗口,您应该可以输入 gomobile 来启动它.

Make this change, then close your Terminal window and open a new one, and you should be able to type gomobile to launch it.

这篇关于总是 -bash: gomobile: 命令未找到的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆