Fix cargo-ndk build command (#15648)
# Objective
- Fix cargo-ndk build command documentation in readme.
```sh
❯ cargo ndk -t arm64-v8a build -o android_example/app/src/main/jniLibs
Building arm64-v8a (aarch64-linux-android)
error: unexpected argument '-o' found
```
## Solution
- Move "build" to the end of the command.
## Testing
- With the new command order building works.
```sh
❯ cargo ndk -t arm64-v8a -o android_example/app/src/main/jniLibs build
Building arm64-v8a (aarch64-linux-android)
Compiling bevy_ptr v0.15.0-dev (/home/eero/repos/bevy/crates/bevy_ptr)
Compiling bevy_macro_utils v0.15.0-dev (/home/eero/repos/bevy/crates/bevy_macro_utils)
Compiling event-listener v5.3.1
... rest of compilation ...
```
This commit is contained in:
parent
e72b9625d7
commit
d0edbdac78
@ -106,13 +106,13 @@ Alternatively, you can install Android Studio.
|
||||
To build an Android app, you first need to build shared object files for the target architecture with `cargo-ndk`:
|
||||
|
||||
```sh
|
||||
cargo ndk -t <target_name> build -o <project_name>/app/src/main/jniLibs
|
||||
cargo ndk -t <target_name> -o <project_name>/app/src/main/jniLibs build
|
||||
```
|
||||
|
||||
For example, to compile to a 64-bit ARM platform:
|
||||
|
||||
```sh
|
||||
cargo ndk -t arm64-v8a build -o android_example/app/src/main/jniLibs
|
||||
cargo ndk -t arm64-v8a -o android_example/app/src/main/jniLibs build
|
||||
```
|
||||
|
||||
Setting the output path ensures the shared object files can be found in target-specific directories under `jniLibs` where the JNI can find them.
|
||||
|
||||
@ -561,13 +561,13 @@ Alternatively, you can install Android Studio.
|
||||
To build an Android app, you first need to build shared object files for the target architecture with `cargo-ndk`:
|
||||
|
||||
```sh
|
||||
cargo ndk -t <target_name> build -o <project_name>/app/src/main/jniLibs
|
||||
cargo ndk -t <target_name> -o <project_name>/app/src/main/jniLibs build
|
||||
```
|
||||
|
||||
For example, to compile to a 64-bit ARM platform:
|
||||
|
||||
```sh
|
||||
cargo ndk -t arm64-v8a build -o android_example/app/src/main/jniLibs
|
||||
cargo ndk -t arm64-v8a -o android_example/app/src/main/jniLibs build
|
||||
```
|
||||
|
||||
Setting the output path ensures the shared object files can be found in target-specific directories under `jniLibs` where the JNI can find them.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user