GoMobile tools not recognised

119 views
Skip to first unread message

starz...@gmail.com

unread,
Aug 18, 2019, 4:27:24 PM8/18/19
to golang-nuts

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.

GolangVersion :- go1.11.5 windows/amd64 

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


starzar

unread,
Aug 28, 2019, 2:14:34 AM8/28/19
to golang-nuts
EDIT 1 

Upon further checking into my Gofiles ,in the GOPATH /src directory there were some Go packages installed which included the "mobile" package.
These packages were installed through  VisualStudio Code .
I ran the gomobile tools command in this "mobile folder"  but still the command is not recognised.
Please let me know how to resolve this issue.

PS D:\Script\Golang\src\golang.org\x\mobile> go version
go version go1
.12.9 windows/amd64
PS D
:\Script\Golang\src\golang.org\x\mobile> gomobile int

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 int

Elias Naur

unread,
Aug 28, 2019, 3:22:56 AM8/28/19
to golang-nuts
When you install gomobile, its tools go in the %USERPROFILE%\go\bin directory. You probably need to add that path to your PATH environment variable.

 - elias

starzar

unread,
Aug 28, 2019, 12:39:07 PM8/28/19
to golang-nuts

On Monday, 19 August 2019 01:57:24 UTC+5:30, starzar wrote:
ANSWER - On reinstalling the latest Golang version [1.12.9 windows/amd64] and reconfiguring the Environment path's ,'GoMobile tools' is now recognised,
Gomobile tools was installed in the GOPATH directory and there was no need to  add it  to  the PATH environment variables.
 
Reply all
Reply to author
Forward
0 new messages