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: confusing "unsupported basic type" error when targeting Android #24762

Anyhasgone opened this issue Apr 8, 2018 · 3 comments


Copy link

@Anyhasgone Anyhasgone commented Apr 8, 2018

Please answer these questions before submitting your issue. Thanks!

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

->go version go1.9 linux/amd64

Does this issue reproduce with the latest release?


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

->linux, amd64

What did you do?


If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on is best.

What did you expect to see?

Please help me.Why unsupported basic type uint32 or uint64

What did you see instead?

the issues:
use gomobile bind -target=android/arm xxxx,and compile error
unsupported basic type: uint32
unsupported basic type: uint64

@gopherbot gopherbot added this to the Unreleased milestone Apr 8, 2018
@gopherbot gopherbot added the mobile label Apr 8, 2018
Copy link

@mvdan mvdan commented Apr 8, 2018

I assume this is because gomobile is trying to generate Java code, and Java has no unsigned integer types. However, a quick google search doesn't give a definite answer, and the error message seems like this may be a bug or fixed at some point, rather than a design limitation.

Leaving it to @eliasnaur or someone else to decide if the error message should be improved. For example, something like "cannot use unsigned integer types on Java" for the uint16/32/64 errors.

@mvdan mvdan added the NeedsDecision label Apr 8, 2018
@mvdan mvdan changed the title x/mobile: x/mobile: confusing "unsupported basic type" error when targeting Android Apr 8, 2018
Copy link

@mvdan mvdan commented Apr 8, 2018

This doc page does leave unsigned integers out:

But it's still hard to reach it if one is googling for the error or searching for "uint", since neither appears on the page.

Copy link

@gopherbot gopherbot commented Apr 8, 2018

Change mentions this issue: bind: ignore unsupported basic types

@golang golang locked and limited conversation to collaborators Apr 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.