bbqsrc / cargo-ndk

Compile Rust projects against the Android NDK without hassle
Apache License 2.0
712 stars 64 forks source link

default ndk location for linux is wrong #133

Closed tkkcc closed 7 months ago

tkkcc commented 7 months ago

here default ndk location use "sdk", but it's actually "Sdk" https://github.com/bbqsrc/cargo-ndk/blob/66f2ba4af9bf938533a9b690d8c4ace00ebe5c98/src/cli.rs#L166

the truth lies on source code of android studio, but it's not online. other evidence: https://stackoverflow.com/questions/43330176/what-is-the-default-android-sdk-path-used-by-android-studio https://stackoverflow.com/a/56528860/7765897

bbqsrc commented 7 months ago

If someone else who is using Linux with Android Studio can confirm this works, then I can merge the PR. In most CI environments, people will be using just the NDK directly so this presumably hasn't been an issue for most folks.

MarijnS95 commented 7 months ago

cargo-apk uses the environment variables exclusively. But indeed, on Linux the path is capitalized Sdk if you're reconstructing it from the users' home folder.

Maybe it's capitalized elsewhere, but doesn't matter when the filesystem is case-insensitive.