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

NDK/SDK Environment Variables #87

Open
rib opened this issue May 1, 2022 · 0 comments
Open

NDK/SDK Environment Variables #87

rib opened this issue May 1, 2022 · 0 comments

Comments

@rib
Copy link

rib commented May 1, 2022

Hi,

I was just looking at giving cargo-mobile a try and one initial little thing I noticed was that it didn't seem to recognise ANDROID_NDK_ROOT or ANDROID_NDK_HOME which I think are both standard environment variables for locating an Android NDK. (Normally I think I expect to switch between either of those and haven't used NDK_ROOT before)

For the SDK it also look cargo mobile considers ANDROID_HOME to be deprecated vs ANDROID_SDK_ROOT, which is incidentally the opposite of these docs: https://developer.android.com/studio/command-line/variables

I guess at this point there's not really any standard for these (lots of conflicting claims about which ones are standard) and I wonder if it could be most practical if cargo-mobile would just try all of these and maybe just show where the SDK/NDK are discovered (and by which variable) without needing to warn that any of the others are deprecated.

SDK:

ANDROID_SDK_HOME
ANDROID_SDK_ROOT
ANDROID_HOME

NDK:

ANDROID_NDK_HOME
ANDROID_NDK_ROOT
NDK_ROOT

E.g. in my case I already had my environment set up with ANDROID_NDK_ROOT and ANDROID_HOME before running cargo mobile init

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

No branches or pull requests

1 participant