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: andtroidapi parameter not working when using gomobile build command #66011

Open
igadmg opened this issue Feb 28, 2024 · 2 comments
Open
Labels
mobile Android, iOS, and x/mobile NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@igadmg
Copy link

igadmg commented Feb 28, 2024

Go version

go1.22

Output of go env in your module/workspace:

set GO111MODULE=                                                                                                                                      set GOARCH=amd64                                                                                                                                      set GOBIN=                                                                                                                                            set GOCACHE=C:\Users\yatag\AppData\Local\go-build                                                                                                     set GOENV=C:\Users\yatag\AppData\Roaming\go\env                                                                                                       set GOEXE=.exe                                                                                                                                        set GOEXPERIMENT=                                                                                                                                     set GOFLAGS=                                                                                                                                          set GOHOSTARCH=amd64                                                                                                                                  set GOHOSTOS=windows                                                                                                                                  set GOINSECURE=                                                                                                                                       set GOMODCACHE=C:\Users\yatag\go\pkg\mod                                                                                                              set GONOPROXY=                                                                                                                                        set GONOSUMDB=                                                                                                                                        set GOOS=windows                                                                                                                                      set GOPATH=C:\Users\yatag\go                                                                                                                          set GOPRIVATE=                                                                                                                                        set GOPROXY=https://proxy.golang.org,direct                                                                                                           set GOROOT=C:\Program Files\Go                                                                                                                        set GOSUMDB=sum.golang.org                                                                                                                            set GOTMPDIR=                                                                                                                                         set GOTOOLCHAIN=auto                                                                                                                                  set GOTOOLDIR=C:\Program Files\Go\pkg\tool\windows_amd64                                                                                              set GOVCS=                                                                                                                                            set GOVERSION=go1.22.0                                                                                                                                set GCCGO=gccgo                                                                                                                                       set GOAMD64=v1                                                                                                                                        set AR=ar                                                                                                                                             set CC=gcc                                                                                                                                            set CXX=g++                                                                                                                                           set CGO_ENABLED=1                                                                                                                                     set GOMOD=E:\research\mobile\go.mod                                                                                                                   set GOWORK=                                                                                                                                           set CGO_CFLAGS=-O2 -g                                                                                                                                 set CGO_CPPFLAGS=                                                                                                                                     set CGO_CXXFLAGS=-O2 -g                                                                                                                               set CGO_FFLAGS=-O2 -g                                                                                                                                 set CGO_LDFLAGS=-O2 -g                                                                                                                                set PKG_CONFIG=pkg-config                                                                                                                             set GOGCCFLAGS=-m64 -mthreads -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=C:\Users\yatag\AppData\Local\Temp\go-build2537081736=/tmp/go-build -gno-record-gcc-switches

What did you do?

I am trying to build a go mobile example app and deploy it to android device with command
gomobile build -target=android -androidapi 23 golang.org/x/mobile/example/basic

What did you see happen?

I see an error about minimal sdk version too low. Android device report that I am using sdk 16 not sdk I mentioned in build parameters
The issue is discussed here in great detail #52470

What did you expect to see?

I expect apk to install flawlesly.

@gopherbot gopherbot added the mobile Android, iOS, and x/mobile label Feb 28, 2024
@gopherbot gopherbot added this to the Unreleased milestone Feb 28, 2024
@igadmg
Copy link
Author

igadmg commented Feb 28, 2024

I already have a fix for that issue but I am struggling to push it for codereview. (prohibited by Gerrit: not permitted: create)

@cagedmantis cagedmantis added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Feb 29, 2024
@cagedmantis
Copy link
Contributor

cc @hyangah

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mobile Android, iOS, and x/mobile NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

3 participants