You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To make Cargo aware of the proper platform-specific linkers that it needs to use for Android targets, we need to put the paths to the binaries in the Cargo configuration file, which can be found (or created) at `$HOME/.cargo/config` on UNIX-like systems, or `%USERPROFILE%\.cargo\config` on Windows), using [`[target]` tables](https://doc.rust-lang.org/cargo/reference/config.html#target):
54
+
To make Cargo aware of the proper platform-specific linkers that it needs to use for Android targets, we need to put the paths to the binaries in the Cargo configuration file, which can be found (or created) at `$HOME/.cargo/config` on UNIX-like systems, or `%USERPROFILE%\.cargo\config` on Windows), using [`[target]` tables](https://doc.rust-lang.org/cargo/reference/config.html#targettriplelinker):
... where the value of `linker` is an **absolute path** to the Android SDK linker for the target triple. Assuming `$ANDROID_SDK_ROOT` is the Android SDK path, these binaries can be found at:
61
+
... where the value of `linker` is an **absolute path** to the Android SDK linker for the target triple. Assuming `$ANDROID_SDK_ROOT` is the Android SDK path and `$ANDROID_NDK_VERSION` is the installed NDK instance version, these binaries can be found at:
62
62
63
-
- Windows: `$ANDROID_SDK_ROOT\ndk\<NDK-VERSION>\toolchains\llvm\prebuilt\windows-x86_64\bin\`, where `<NDK-VERSION>` is the installed NDK instance version
> Alternatively, the NDK can be located under `$ANDROID_SDK_ROOT/ndk-bundle` instead of `$ANDROID_SDK_ROOT/ndk/$ANDROID_NDK_VERSION`, but this folder is deprecated because it doesn't allow for parallel versions installation.
65
67
66
68
Repeat for all targets installed in the previous step, until we get something that looks like:
67
69
68
70
```toml
69
71
# Example configuration on an UNIX-like system. `29` is the Android API version.
0 commit comments