-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
Comments
Change https://golang.org/cl/171938 mentions this issue: |
One complication is that |
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 |
After trying $ANDROID_HOME/ndk-bundle, we also try $ANDROID_NDK_HOME. ANDROID_NDK_HOME is advised in this NDK sample code wiki: https://github.com/googlesamples/android-ndk/wiki Mentioned in the Bazel buildsystem Android app tutorial: https://docs.bazel.build/versions/master/tutorial/android-app.html 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 Fixes golang/go#31461 Change-Id: I9f7f7e24b19e0047419f9725b67bd6daf2b1d328 Reviewed-on: https://go-review.googlesource.com/c/mobile/+/171938 Run-TryBot: Elias Naur <mail@eliasnaur.com> Reviewed-by: Elias Naur <mail@eliasnaur.com>
After trying $ANDROID_HOME/ndk-bundle, we also try $ANDROID_NDK_HOME. ANDROID_NDK_HOME is advised in this NDK sample code wiki: https://github.com/googlesamples/android-ndk/wiki Mentioned in the Bazel buildsystem Android app tutorial: https://docs.bazel.build/versions/master/tutorial/android-app.html 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 Fixes golang/go#31461 Change-Id: I9f7f7e24b19e0047419f9725b67bd6daf2b1d328 Reviewed-on: https://go-review.googlesource.com/c/mobile/+/171938 Run-TryBot: Elias Naur <mail@eliasnaur.com> Reviewed-by: Elias Naur <mail@eliasnaur.com>
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
The text was updated successfully, but these errors were encountered: