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: app crashed, android 2.3.6 #13172

Closed
DeadNumbers opened this issue Nov 6, 2015 · 5 comments

Comments

Projects
None yet
4 participants
@DeadNumbers
Copy link

commented Nov 6, 2015

I build basic example, but it crashed. gomobile suported old android?

@hyangah

This comment has been minimized.

Copy link
Contributor

commented Nov 6, 2015

It's not surprising that the gomobile compiled app doesn't run on Gingerbread (API level 10)
Gomobile uses NDK of platform-15 internally.
I propose to update the minSDKVersion in the default AndroidManifest to be 15, not 9, and clearly document it.

/cc @crawshaw @rakyll @dskinner

@dskinner

This comment has been minimized.

Copy link
Member

commented Nov 6, 2015

wasn't aware of ndk constraint on api-15. As mentioned on #13109 I believe the appropriate thing to do is abort on compilation if a manifest declares a minimum api level. The gomobile cmd should then insert the min api tag itself to whatever is decided (+2 to api-15). These are the tentative plans in the issue I linked, but it may be a month or two before that issue is actually resolved.

In the interim, there's little reason the current implementation couldn't go ahead and do this now. This would result in the following behavior as related to the reported issue.

  • Specifying a minimum or target api would result in compilation abort and error message logged.
  • Attempting to install the resulting apk on an older version of android would result in android reporting that the app is for newer versions of android and abort the install.

I can put together a CL this weekend if this sounds ok.

@hyangah

This comment has been minimized.

Copy link
Contributor

commented Nov 6, 2015

In this particular case (the basic example), the manifest file is the default one filled by gomobile tool.
We need to update it to be api-15.

https://github.com/golang/mobile/blob/master/cmd/gomobile/manifest.go#L64

In case a custom manifest file is given, yes, I think it's okay to abort and output helpful error message.
I hope android gives already a useful error message if the device platform is too old for the app. (I am not sure)

Assigning to @dskinner. Thanks!

@hyangah hyangah added this to the Unreleased milestone Nov 6, 2015

@DeadNumbers

This comment has been minimized.

Copy link
Author

commented Nov 6, 2015

thanks to all.

@DeadNumbers DeadNumbers closed this Nov 6, 2015

@gopherbot

This comment has been minimized.

Copy link

commented Nov 12, 2015

CL https://golang.org/cl/16843 mentions this issue.

crawshaw added a commit to golang/mobile that referenced this issue Nov 13, 2015

cmd/gomobile: synthesize minSdkVersion for manifest
Fixes golang/go#13172

Change-Id: I16cab3f74f668ce3522a1a14c979aca5c988347c
Reviewed-on: https://go-review.googlesource.com/16843
Reviewed-by: David Crawshaw <crawshaw@golang.org>

@golang golang locked and limited conversation to collaborators Nov 16, 2016

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.