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: Gomobile error: cannot find symbol #23327
Comments
Is the underlying Go implementation of the |
No, I don't have any Touch function in my code. |
What is "haum.io/hink/brain"? Can you please publish a minimal example of code to reproduce the error? |
It is a Home Automation client that I am trying to run on Android Things or Windows 10 Iot core. You can checkout the init branch and do a |
Looks like the error happens when the struct name is the same as the package name; "brain.Brain" in this case. @laibulle can you please try binding after renaming your "Brain" struct? gomobile seems to want to generate it's own java class with the same name as the package. This generated package class has the touch() function. See gomobile
|
It works. Thanks a lot! |
@eliasnaur @hyangah perhaps this could be fixed in gomobile? To reproduce:
|
Change https://golang.org/cl/87656 mentions this issue: |
If a Go struct or interface has the same name as its package class, append an underscore to the generated Java class name. Fixes golang/go#23327. Change-Id: Ib680af35c956801073a0effb510a3ed9bbb8b9d1 Reviewed-on: https://go-review.googlesource.com/87656 Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
If a Go struct or interface has the same name as its package class, append an underscore to the generated Java class name. Fixes golang/go#23327. Change-Id: Ib680af35c956801073a0effb510a3ed9bbb8b9d1 Reviewed-on: https://go-review.googlesource.com/87656 Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
If a Go struct or interface has the same name as its package class, append an underscore to the generated Java class name. Fixes golang/go#23327. Change-Id: Ib680af35c956801073a0effb510a3ed9bbb8b9d1 Reviewed-on: https://go-review.googlesource.com/87656 Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
What version of Go are you using (
go version
)?go version go1.9.2 darwin/amd64
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?What did you do?
I am trying build a mobile library for android with gomobile.
What did you expect to see?
A .aar generated archive
What did you see instead?
The text was updated successfully, but these errors were encountered: