golang.org/x/xxx 中所有的包对应 github.com/golang/xxx

github.com 一般不需要翻墙,只要从github.com中检出,ln -s github.com/golang/tools golang.org/x/tools 即可

xxx:~ xxx$ gomobile build -target=android golang.org/x/mobile/example/basic
gomobile: no Android NDK path is set. Please run gomobile init with the ndk-bundle installed through the Android SDK manager or with the -ndk flag set.

解决办法:使用-ndk参数打入或者配置ANDROID_HOME 且目录下面必须有ndk-bundle目录(这个我没验证成功)

xxxx:~ xxxx$ sudo gomobile init -ndk /Users/xxxx/Documents/adt-bundle-mac-x86_64-20140321/android-ndk-r10c 
gomobile: go install -gcflags=-shared -ldflags=-shared -pkgdir=/Users/xxxx/go/pkg/gomobile/pkg_android_arm std failed: exit status 2
# runtime/cgo
fork/exec /Users/xxx/Documents/adt-bundle-mac-x86_64-20140321/android-ndk-r10c/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang: no such file or directory

没有llvm版本的编译器,原因:ndk版本太老,报错版本是ndk-10c而ndk-10d才加入llvm