golang / go

The Go programming language
https://go.dev
BSD 3-Clause "New" or "Revised" License
124.07k stars 17.68k forks source link

x/mobile: Failed to build aar when updated to golang1.8 #19377

Closed liyiheng closed 6 years ago

liyiheng commented 7 years ago

go1.8 darwin/amd64

GOOS="darwin"

Tried to build primitive to Android SDK app 'gomobile' finished with non-zero exit value 1

gomobile: loadExportData failed reading export data: /var/.../primitive.a: invalid encoding format in export data: got 'v'; want 'c' or 'd'

Then I tested with a hello-world-project created which was OK, failed too.

themihai commented 7 years ago

I've got the same error on iOS gomobile bind -target=ios x.org/themihai/remote gomobile: reading export data: /var/folders/96/xn9qmts104s1mcdqg31s66lh0000gn/T/gomobile-work-670052359/fakegopath/pkg/darwin_arm/bitbucket.org/themihai/tv/remote.a: invalid encoding format in export data: got 'v'; want 'c' or 'd'

themihai commented 7 years ago

go get -u golang.org/x/mobile/... go install golang.org/x/mobile/cmd/... Fixed the issue for me.