.png)
Na instalaçãoFerramentas móveis Golangna minha máquina Windows10-64bit, as ferramentas gomobile não são reconhecidas. O caminho de instalação é oCAMINHO GOROOT C:\Ir.
GoVersão: -go1.11.5 windows/amd64está instalado na minha máquina.
Por favor, deixe-me saber como fazer com que as ferramentas móveis Golang funcionem.
PS C:\Go> go get golang.org/x/mobile/cmd/gomobile
PS C:\Go> gomobile init
gomobile : The term 'gomobile' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path
was included, verify that the path is correct and try again.
At line:1 char:2
+ gomobile init
+ ~~~~~~~~
+ CategoryInfo : ObjectNotFound: (gomobile:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
PS C:\Go> gomobile version
gomobile : The term 'gomobile' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path
was included, verify that the path is correct and try again.
At line:1 char:1
+ gomobile version
+ ~~~~~~~~
+ CategoryInfo : ObjectNotFound: (gomobile:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
PS C:\Go> go version
go version go1.11.5 windows/amd64
Responder1
As ferramentas Gomobile usam os caminhos de referência GOPATH e GOROOT fornecidos nas variáveis de ambiente/sistema para se instalar.
Deve-se tomar cuidado para que os caminhos corretos sejam fornecidos e, após a nova instalação do GoVersion, todos os caminhos antigos (que não são mais válidos) devem ser excluídos.
Ao seguir as etapas acima e apontar as ferramentas Gomobile para o GOPATH para instalação, as ferramentas Gomobile funcionam bem.
Além disso, não há necessidade de colocar “gomobile” no caminho do ambiente.