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

Closed
seaguest opened this issue Jan 16, 2017 · 1 comment

Comments

Projects
None yet
3 participants
@seaguest
Copy link

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)?

GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH=""
GORACE=""
GOROOT="/home/seaguest/go"
GOTOOLDIR="/home/seaguest/go/pkg/tool/linux_amd64"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build907249124=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"

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 libgojni.so 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.

@ALTree

This comment has been minimized.

Copy link
Member

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 https://github.com/golang/go/wiki/Questions 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.
You can’t perform that action at this time.