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: gomobile generated apk is too big #18674

seaguest opened this issue Jan 16, 2017 · 1 comment

x/mobile: gomobile generated apk is too big #18674

seaguest opened this issue Jan 16, 2017 · 1 comment


Copy link

@seaguest seaguest commented Jan 16, 2017

Please answer these questions before submitting your issue. Thanks!

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

go version go1.7.3 linux/amd64

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

GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build907249124=/tmp/go-build -gno-record-gcc-switches"

What did you do?

If possible, provide a recipe for reproducing the error.
I just tried to write some SDK api with gomobile, and introduced it in my android project, the api are quite simple, but the generated is too big (about 10M), which makes the apk very big, it at least incresed 10M of the size.

What did you expect to see?

how could I shrink the apk size?

What did you see instead?

the apk file's size increased at least 10 M. if gomobile compiled sdk is not introduced, the apk is 1.5M, however if it is introduced then the apk becomes 15M.

Copy link

@ALTree ALTree commented Jan 16, 2017

Essentially a dup of #14465 (which is also a dup, of the more generic #6853).

how could I shrink the apk size?

See comment in the old 14465 thread for some tips.

Also note that the Go project does not use its bug tracker for general discussion or asking questions. It's only for tracking bugs and proposals. If you have a question, please see for a list of better places for asking it.

@ALTree ALTree closed this Jan 16, 2017
@golang golang locked and limited conversation to collaborators Jan 16, 2018
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.