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 is not compatible with modern Android SDKs and NDKs #52470

Closed
bemasc opened this issue Apr 21, 2022 · 5 comments
Closed

x/mobile: Gomobile is not compatible with modern Android SDKs and NDKs #52470

bemasc opened this issue Apr 21, 2022 · 5 comments
Labels
mobile NeedsInvestigation
Milestone

Comments

@bemasc
Copy link
Contributor

@bemasc bemasc commented Apr 21, 2022

Gomobile makes a number of assumptions about the Android SDK and NDK that are no longer correct:

  • ANDROID_HOME provides the SDK location (soft-deprecated in favor of a default path)
  • Android API 15 is supported. (All supported SDKs have a minimum API version of 16 or higher)
  • There is only one possible NDK to use (false under the new "side by side" NDK system)
  • ANDROID_NDK_HOME provides the NDK location (hard-deprecated due to "side by side" NDK)
  • $ANDROID_HOME/ndk-bundle is the default NDK location (it is now $ANDROID_HOME/ndk/<version>)
  • Android binary resource packages only contain "Type" and "TypeSpec" entries (they can now contain Staged Alias Headers as well)

These assumptions seem to make Gomobile incompatible with NDK 24, and somewhat inconvenient to use with other modern SDK and NDK versions.

@gopherbot gopherbot added the mobile label Apr 21, 2022
@gopherbot gopherbot added this to the Unreleased milestone Apr 21, 2022
@bemasc
Copy link
Contributor Author

@bemasc bemasc commented Apr 21, 2022

Proposed fix at https://go-review.googlesource.com/c/mobile/+/401574

@thanm thanm added the NeedsInvestigation label Apr 22, 2022
@thanm
Copy link
Contributor

@thanm thanm commented Apr 22, 2022

Thanks for the report.

@gopherbot
Copy link

@gopherbot gopherbot commented May 3, 2022

Change https://go.dev/cl/401574 mentions this issue: x/mobile: modernize handling of Android SDK and NDK paths

@hyangah
Copy link
Contributor

@hyangah hyangah commented May 4, 2022

Thanks for the report and change.

What is the alternative to ANDROID_HOME now? From the latest android doc, I see ANDROID_HOME is still listed as the primary environment variable to control the location of android SDK. (ANDROID_SDK_ROOT is deprecated)
https://developer.android.com/studio/command-line/variables
Screen Shot 2022-05-04 at 9 19 15 AM

@changkun
Copy link
Member

@changkun changkun commented May 4, 2022

What is the alternative to ANDROID_HOME now?

The CL 244057 is relevant to this question, which may help CL 401574 further improve in updating to the latest conventions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mobile NeedsInvestigation
Projects
None yet
Development

No branches or pull requests

5 participants