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 doesn't find Android NDK installed from typical dist pkgs #31461

quite opened this issue Apr 14, 2019 · 3 comments


None yet
3 participants
Copy link

commented Apr 14, 2019

On Ubuntu, the google-android-ndk-installer leaves the NDK in /usr/lib/android-ndk, and it seems to be up to the user to set ANDROID_NDK_HOME.

On Arch Linux, the android-ndk package installs the NDK into /opt/android-ndk and sets ANDROID_NDK_HOME to there using an /etc/profile.d/file

There are also other variables, such as ANDROID_NDK, but they seem deprecated. This was somewhat informative: openssl/openssl#8103

@gopherbot gopherbot added this to the Unreleased milestone Apr 14, 2019

@gopherbot gopherbot added the mobile label Apr 14, 2019


This comment has been minimized.

Copy link

commented Apr 14, 2019

Change mentions this issue: cmd/gomobile: look also in $ANDROID_NDK_HOME for the NDK...


This comment has been minimized.

Copy link

commented Apr 14, 2019

One complication is that gomobile build uses tools from the Android SDK. What to do when only ANDROID_NDK_HOME is set?


This comment has been minimized.

Copy link

commented Apr 15, 2019

It looks like all code that references ANDROID_HOME (which is where such tools must be picked up) returns error if it can't be found.

And the code that I touch for this issue is only in the ndkRoot() function, so just doing our best there to find the NDK should be enough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.