-
Notifications
You must be signed in to change notification settings - Fork 18.1k
command not found: gomobile #21818
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The docs are wrong. The correct installation command needs a |
I tried |
jnml@4670:~$ go get golang.org/x/mobile/cmd/gomobile/...
jnml@4670:~$ gomobile
Gomobile is a tool for building and running mobile apps written in Go.
To install:
$ go get golang.org/x/mobile/cmd/gomobile
$ gomobile init
At least Go 1.7 is required.
For detailed instructions, see https://golang.org/wiki/Mobile.
Usage:
gomobile command [arguments]
Commands:
bind build a library for Android and iOS
build compile android APK and iOS app
clean remove object files and cached gomobile files
init install mobile compiler toolchain
install compile android APK and install on device
version print version
Use 'gomobile help [command]' for more information about that command.
jnml@4670:~$ |
|
Check the output of |
|
That's okay. Somewhere later you should see the gomobile binary being installed in the real target. jnml@4670:~$ go get -x golang.org/x/mobile/cmd/gomobile/... |& tee log
cd .
git clone https://go.googlesource.com/mobile /home/jnml/src/golang.org/x/mobile
cd /home/jnml/src/golang.org/x/mobile
git submodule update --init --recursive
cd /home/jnml/src/golang.org/x/mobile
git show-ref
cd /home/jnml/src/golang.org/x/mobile
git submodule update --init --recursive
WORK=/tmp/go-build091402936
mkdir -p $WORK/golang.org/x/mobile/internal/importers/_obj/
mkdir -p $WORK/golang.org/x/mobile/internal/
cd /home/jnml/src/golang.org/x/mobile/internal/importers
/home/jnml/go/pkg/tool/linux_amd64/compile -o $WORK/golang.org/x/mobile/internal/importers.a -trimpath $WORK -goversion go1.9 -p golang.org/x/mobile/internal/importers -complete -buildid 10ad5176a886be7a0cf5f1013b22780e89b4b459 -D _/home/jnml/src/golang.org/x/mobile/internal/importers -I $WORK -pack ./ast.go
mkdir -p $WORK/golang.org/x/mobile/internal/binres/_obj/
cd /home/jnml/src/golang.org/x/mobile/internal/binres
/home/jnml/go/pkg/tool/linux_amd64/compile -o $WORK/golang.org/x/mobile/internal/binres.a -trimpath $WORK -goversion go1.9 -p golang.org/x/mobile/internal/binres -complete -buildid ef309c4d3750dd0914b540c234032618c9c78f05 -D _/home/jnml/src/golang.org/x/mobile/internal/binres -I $WORK -pack ./arsc.go ./binres.go ./binres_string.go ./node.go ./pool.go ./sdk.go ./table.go
mkdir -p /home/jnml/pkg/linux_amd64/golang.org/x/mobile/internal/
mv $WORK/golang.org/x/mobile/internal/importers.a /home/jnml/pkg/linux_amd64/golang.org/x/mobile/internal/importers.a
mkdir -p $WORK/golang.org/x/mobile/internal/importers/java/_obj/
mkdir -p $WORK/golang.org/x/mobile/internal/importers/
cd /home/jnml/src/golang.org/x/mobile/internal/importers/java
/home/jnml/go/pkg/tool/linux_amd64/compile -o $WORK/golang.org/x/mobile/internal/importers/java.a -trimpath $WORK -goversion go1.9 -p golang.org/x/mobile/internal/importers/java -complete -buildid a11cfbbf4ce5e4f3eb2e80c894a477e70bbfb338 -D _/home/jnml/src/golang.org/x/mobile/internal/importers/java -I $WORK -I /home/jnml/pkg/linux_amd64 -pack ./java.go
mkdir -p $WORK/golang.org/x/mobile/internal/importers/objc/_obj/
cd /home/jnml/src/golang.org/x/mobile/internal/importers/objc
/home/jnml/go/pkg/tool/linux_amd64/compile -o $WORK/golang.org/x/mobile/internal/importers/objc.a -trimpath $WORK -goversion go1.9 -p golang.org/x/mobile/internal/importers/objc -complete -buildid b5f35612105c5821be22cd9b7ecdb6d6e5e9ffad -D _/home/jnml/src/golang.org/x/mobile/internal/importers/objc -I $WORK -I /home/jnml/pkg/linux_amd64 -pack ./objc.go
mkdir -p /home/jnml/pkg/linux_amd64/golang.org/x/mobile/internal/importers/
mv $WORK/golang.org/x/mobile/internal/importers/objc.a /home/jnml/pkg/linux_amd64/golang.org/x/mobile/internal/importers/objc.a
mv $WORK/golang.org/x/mobile/internal/importers/java.a /home/jnml/pkg/linux_amd64/golang.org/x/mobile/internal/importers/java.a
mkdir -p $WORK/golang.org/x/mobile/bind/_obj/
mkdir -p $WORK/golang.org/x/mobile/
cd /home/jnml/src/golang.org/x/mobile/bind
/home/jnml/go/pkg/tool/linux_amd64/compile -o $WORK/golang.org/x/mobile/bind.a -trimpath $WORK -goversion go1.9 -p golang.org/x/mobile/bind -complete -buildid fc5ec3b5ee65fa5a25a57c76e231a3256f16e859 -D _/home/jnml/src/golang.org/x/mobile/bind -I $WORK -I /home/jnml/pkg/linux_amd64 -pack ./bind.go ./gen.go ./genclasses.go ./gengo.go ./genjava.go ./genobjc.go ./genobjcw.go ./printer.go ./types.go
mv $WORK/golang.org/x/mobile/internal/binres.a /home/jnml/pkg/linux_amd64/golang.org/x/mobile/internal/binres.a
mkdir -p /home/jnml/pkg/linux_amd64/golang.org/x/mobile/
mv $WORK/golang.org/x/mobile/bind.a /home/jnml/pkg/linux_amd64/golang.org/x/mobile/bind.a
mkdir -p $WORK/golang.org/x/mobile/cmd/gomobile/_obj/
mkdir -p $WORK/golang.org/x/mobile/cmd/gomobile/_obj/exe/
cd /home/jnml/src/golang.org/x/mobile/cmd/gomobile
/home/jnml/go/pkg/tool/linux_amd64/compile -o $WORK/golang.org/x/mobile/cmd/gomobile.a -trimpath $WORK -goversion go1.9 -p main -complete -buildid 631396958ab6137527f52e627b9e9f9e5ce2b99e -D _/home/jnml/src/golang.org/x/mobile/cmd/gomobile -I $WORK -I /home/jnml/pkg/linux_amd64 -pack ./binary_xml.go ./bind.go ./bind_androidapp.go ./bind_iosapp.go ./build.go ./build_androidapp.go ./build_iosapp.go ./cert.go ./clean.go ./dex.go ./doc.go ./env.go ./init.go ./install.go ./main.go ./manifest.go ./strings_flag.go ./version.go ./writer.go
cd .
/home/jnml/go/pkg/tool/linux_amd64/link -o $WORK/golang.org/x/mobile/cmd/gomobile/_obj/exe/a.out -L $WORK -L /home/jnml/pkg/linux_amd64 -extld=gcc -buildmode=exe -buildid=631396958ab6137527f52e627b9e9f9e5ce2b99e $WORK/golang.org/x/mobile/cmd/gomobile.a
mkdir -p /home/jnml/bin/
mv $WORK/golang.org/x/mobile/cmd/gomobile/_obj/exe/a.out /home/jnml/bin/gomobile
jnml@4670:~$ Note the last mv command. |
This is all the command returns for me:
|
Well, it's a bit brutal but try adding |
I think I found the error… |
But wait. Go is not installed for root so |
Nothing to do here. Please ask questions on a forum: https://golang.org/wiki/Questions . Thanks. |
export PATH=$PATH:~/go/bin |
Mine still cannot work |
What version of Go are you using (
go version
)?go version go1.8.3 linux/amd64
Does this issue reproduce with the latest release?
Afaik that is the latest release
What operating system and processor architecture are you using (
go env
)?go env
What did you do?
The official way to install go and then:
go get golang.org/x/mobile/cmd/gomobile
A restart of my computer just to be sure
What did you expect to see?
I expect to be able to execute
gomobile init
What did you see instead?
Neither Bash nor Zsh could find/execute gomobile
The text was updated successfully, but these errors were encountered: