Closed bigdogs closed 3 years ago
with --stacktrace flags added, it says that "No such file or directory" for cargo, Does anyone knows how to resolve this?
Solution still not found, but another plugin "https://github.com/willir/cargo-ndk-android-gradle" works for me.
issue closed
For the next person, you can set rust.cargoCommand
in your local.properties
, or an environment variable, or mangle your path: see https://github.com/ncalexan/rust-android-gradle/blob/master/README.md#specifying-paths-to-sub-commands-python-and-cargo.
Solution still not found, but another plugin "https://github.com/willir/cargo-ndk-android-gradle" works for me.
Just for your own info, we're thinking of promoting that plugin to "top of the stack" -- see the discussion in #40. I'm glad that plugin is working for you!
I'm having the same issue, Unfortunately i cannot use the other gradle plugin as I cannot create Desktop builds to run my unit tests.
I've tried setting the rust.cargoCommand
to /usr/bin/cargo
and /home/user/.cargo/bin/cargo
and neither work.
@Progdrasil lots of logs and information about your configuration will be needed for us to get started tracking things down for you. Can you start by attaching ./gradlew --debug
logs?
I had the same issue. I first tried to specify the cargo path, where it said Process 'command '/Users/{myname}/.cargo/bin/cargo'' finished with exit value -1 (state: FAILED)
. Running with --debug showed me the actual error, which was that my working_dir specified via module = "../rust"
was invalid.
The solution for me was to specify it like this: module = "../../rust"
as my project structure looked like this:
./android/app/build.gradle
./rust_project/cargo.toml
Hi, I compile failed with the following message, but there is no useful error message.
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':app:cargoBuildArm'.
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 638ms 4:27:44 PM: Task execution finished 'build'.