rust-mobile / ndk

Rust bindings to the Android NDK
Apache License 2.0
1.14k stars 112 forks source link

Is the wrong environment variable being stated as deprecated? #327

Closed Hoodad closed 2 years ago

Hoodad commented 2 years ago

Hello!

As noted in the title if you have the environment variable ANDROID_HOME set you are greeted with a warning telling you to use ANDROID_SDK_ROOT instead and remove the ANDROID_HOME variable. However from reading the Android documentation I get the impression its the opposite relation, that ANDROID_SDK_ROOT is deprecated and shall not be used?

From the Android documentation.

ANDROID_HOME | Sets the path to the SDK installation directory. Once set, the value does not typically change, and can be shared by multiple users on the same machine. ANDROID_SDK_ROOT, which also points to the SDK installation directory, is deprecated. If you continue to use it, Android Studio and the Android Gradle plugin will check that the old and new variables are consistent.

The error in question can be found here, https://github.com/rust-windowing/android-ndk-rs/blob/caeb591038a4c3642188cd17db19dca69a2f9086/ndk-build/src/ndk.rs#L21-L23

MarijnS95 commented 2 years ago

https://github.com/rust-windowing/android-ndk-rs/pull/39

That's what you get with PRs that fail to quote any reference material.