x/mobile: gradle plugin fails on Mac due to -i flag trying to change /usr/local #25076
Labels
Milestone
Comments
Change https://golang.org/cl/109144 mentions this issue: |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
What version of Go are you using (
go version
)?go version go1.10.1 darwin/amd64
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?darwin amd64
What did you do?
add gradle plugin to Android studio project and try to build
What did you expect to see?
.aar built by gomobile
What did you see instead?
build failed.
go build runtime/cgo: mkdir /usr/local/go/pkg/android_arm_shared: permission denied
/Users/junda/go/bin/gomobile: go build -v -i -buildmode=c-shared -o=/var/folders/.../android/src/main/jniLibs/armeabi-v7a/libgojni.so gobind failed: exit status 1
Running gomobile without -i works without issue.
Also in 1.10 release note https://golang.org/doc/go1.10:
"The old advice to add the -i flag for speed, as in go build -i or go test -i, is no longer necessary: builds run just as fast without -i. For more details, see gohelp cache."
Proposal
https://go-review.googlesource.com/c/mobile/+/109144 to remove the -i flag.
The text was updated successfully, but these errors were encountered: