1

On installing Golang mobile tools on my Windows10-64bit machine,the gomobile tools are not recognised . The installation path is the GOROOT PATH C:\Go.

GoVersion :- go1.11.5 windows/amd64 is installed on my machine.

Please let me know how to get Golang mobile tools to work.

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
srt111
  • 203

1 Answers1

1

Gomobile tools uses the reference GOPATH and GOROOT paths provided in environment/system variables to install itself.

Care has to be taken that the right paths are provided and upon new GoVersion installation ,all old paths (which are not valid any more) should be deleted.

Upon following the above steps and pointing the Gomobile tools to the GOPATH for installation ,the gomobile tools work fine.

Also,there is no need to put "gomobile" in the environment path.

srt111
  • 203