.png)
설치시Golang 모바일 도구내 Windows10-64비트 컴퓨터에서 gomobile 도구가 인식되지 않습니다. 설치 경로는GOROOT 경로 C:\Go.
Go버전 :-go1.11.5 창/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"을 넣을 필요가 없습니다.