Инструменты GoMobile не распознаются (Golang)

Инструменты GoMobile не распознаются (Golang)

При установкеМобильные инструменты Golangна моем компьютере Windows10-64bit, gomobile tools не распознаются. Путь установки -ПУТЬ GOROOT C:\Go.

GoVersion:-go1.11.5 windows/amd64установлен на моем компьютере.

Пожалуйста, дайте мне знать, как заставить работать мобильные инструменты Golang.

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

решение1

Инструменты Gomobile используют для своей установки справочные пути GOPATH и GOROOT, указанные в переменных среды/системы.

Необходимо следить за тем, чтобы были указаны правильные пути, а при установке новой версии GoVersion все старые пути (которые больше не действительны) следует удалить.

После выполнения вышеуказанных шагов и указания инструментам Gomobile пути GOPATH для установки инструменты Gomobile будут работать нормально.

Кроме того, нет необходимости указывать «gomobile» в пути к среде.

Связанный контент