Skip to content
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

x/mobile/cmd/gobind: building error #13740

Closed
star-tek-mb opened this issue Dec 27, 2015 · 2 comments
Closed

x/mobile/cmd/gobind: building error #13740

star-tek-mb opened this issue Dec 27, 2015 · 2 comments

Comments

@star-tek-mb
Copy link

There is a error in binding and building go package from AndroidStudio.
Message error:

Information:Gradle tasks [:app:generateDebugSources, :app:generateDebugAndroidTestSources]
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE
:hello:gobind
/home/startek/go/bin/gomobile: 'go version' failed: exit status 2, go: cannot find GOROOT directory: /usr/local/go
Error:Execution failed for task ':hello:gobind'.
> Process 'command '/home/startek/go/bin/gomobile'' finished with non-zero exit value 1
Information:BUILD FAILED
Information:Total time: 5.644 secs
Information:1 error
Information:0 warnings
Information:See complete output in console

General message - GOROOT not found. I installed go to custom folder. GOROOT, GOBIN, GOPATH variables are setted. AndroidStudio dont understand global variables. My decision - Settings -> Build, Execution, Deployment -> Path Variables -> Add new variable - GOROOT - /home/startek/go. But this trick not work.

When I build from console:

./gradlew assembleDebug

Its OK.

Maybe, there is a fix for gobind plugin. I use gobind 0.2.3.

@rsc
Copy link
Contributor

rsc commented Dec 28, 2015

/cc @crawshaw @hyangah

@rsc rsc added this to the Unreleased milestone Dec 28, 2015
@crawshaw
Copy link
Member

In your standard shell environment, are you setting GOROOT?

Typical advice around here is never set GOROOT. If you've taken the binary distribution from golang.org which expects to be installed in /usr/local/go and put it somewhere else, unset GOROOT and run make.bash.

@golang golang locked and limited conversation to collaborators Jan 13, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants