Open TomMD opened 7 months ago
Moving this to cargo-apk
because the issue described is either a build system issue, or a rust-android-examples
(via android-activity
) example setup/documentation issue. Neither of which relate to the native libandroid.so
(and friends) bindings provided by the ndk
crate.
strace
tells me this:
openat(AT_FDCWD, "/home/hz/programmieren/rust/my-project/target/aarch64-linux-android/debug/build", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
I have a global cargo target directory configured in ~/.cargo/config.toml
. As a workaround I created a cargo config in my project directory, which sets build.target-dir = "target"
. This fixes the issue for me.
@rednaz1337 that must originate from the following snippet:
While target-dir
is parsed from .cargo/confg.toml
, as you found it is currently only detected in the package workspace, but not up-merged from parent directories and ultimately the global home folder config based on this structure: https://doc.rust-lang.org/cargo/reference/config.html#hierarchical-structure
This TODO is ""tracked"" at https://github.com/rust-mobile/cargo-subcommand/blob/de0458c0cedfad69717fbbc09a2ef23226318e10/src/subcommand.rs#L83-L88.
In a nut shell:
This is after a system setup which I tried to capture:
(Notice the 'ANDROID_SDK_HOME' envvar is deprecated, contrary to the readme)