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: android bind failing #33382

Closed
davidsteed opened this issue Jul 31, 2019 · 10 comments
Closed

x/mobile: android bind failing #33382

davidsteed opened this issue Jul 31, 2019 · 10 comments
Labels
FrozenDueToAge mobile Android, iOS, and x/mobile
Milestone

Comments

@davidsteed
Copy link

What version of Go are you using (go version)?1.12.5

$ go version

Does this issue reproduce with the latest release?Yes

What operating system and processor architecture are you using (go env)?darwin

go env Output
$ go env

What did you do? gomobile bind -target android .

What did you expect to see? Build working

What did you see instead? gomobile: /Users/davidsteed/go/bin/gobind -lang=go,java -outdir=/var/folders/v9/_mzflmvx1t5d5tmv6b4211tc0000gn/T/gomobile-work-641481098 scp/ped failed: exit status 1

failed to open Java support file: open /Users/davidsteed/src/golang.org/x/mobile/bind/java/LoadJNI.java: no such file or directory
failed to copy Java support file: invalid argument

@gopherbot gopherbot added this to the Unreleased milestone Jul 31, 2019
@gopherbot gopherbot added the mobile Android, iOS, and x/mobile label Jul 31, 2019
@davidsteed davidsteed changed the title x/mobile: x/mobile: android bind failing Jul 31, 2019
@AlexRouSg
Copy link
Contributor

Your gomobile binary and sources do not match. How did you install gomobile?

@davidsteed
Copy link
Author

davidsteed commented Jul 31, 2019 via email

@AlexRouSg
Copy link
Contributor

Try go get -u golang.org/x/mobile/cmd/gomobile

@davidsteed
Copy link
Author

davidsteed commented Jul 31, 2019 via email

@davidsteed
Copy link
Author

davidsteed commented Jul 31, 2019 via email

@AlexRouSg
Copy link
Contributor

AlexRouSg commented Jul 31, 2019

Try deleting the gomobile binary and sources manually and run gomobile -h to make sure it's not found. If it doesn't error then you have another gomobile binary somewhere. Then go get ... again.

I'm sure your binary is outdated because LoadJNI.java was removed from the sources a while ago. (~20 days ago)

I had GOMODULES turned off. When I put it back to automatic this went away
and I got this error

gomobile does not work with modules, so you need to do everything the gopath way.

@davidsteed
Copy link
Author

davidsteed commented Jul 31, 2019 via email

@AlexRouSg
Copy link
Contributor

AlexRouSg commented Jul 31, 2019

Can you do the same for the gobind command?
Sorry forgot about that one earlier.

@davidsteed
Copy link
Author

davidsteed commented Jul 31, 2019 via email

@AlexRouSg
Copy link
Contributor

Can you please close this issue then?

@golang golang locked and limited conversation to collaborators Jul 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge mobile Android, iOS, and x/mobile
Projects
None yet
Development

No branches or pull requests

3 participants