cargo-mobile
cargo-mobile copied to clipboard
NDK/SDK Environment Variables
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