I have a tauri app with that i want to run on mobile so I am moving to v2 and I am trying to run npx tauri android dev
but i get this error
cargo:rerun-if-env-changed=X86_64_LINUX_ANDROID_OPENSSL_LIB_DIR
X86_64_LINUX_ANDROID_OPENSSL_LIB_DIR unset
cargo:rerun-if-env-changed=OPENSSL_LIB_DIR
OPENSSL_LIB_DIR unset
cargo:rerun-if-env-changed=X86_64_LINUX_ANDROID_OPENSSL_INCLUDE_DIR
X86_64_LINUX_ANDROID_OPENSSL_INCLUDE_DIR unset
cargo:rerun-if-env-changed=OPENSSL_INCLUDE_DIR
OPENSSL_INCLUDE_DIR unset
cargo:rerun-if-env-changed=X86_64_LINUX_ANDROID_OPENSSL_DIR
X86_64_LINUX_ANDROID_OPENSSL_DIR unset
cargo:rerun-if-env-changed=OPENSSL_DIR
OPENSSL_DIR unset
cargo:rerun-if-env-changed=OPENSSL_NO_PKG_CONFIG
cargo:rerun-if-env-changed=PKG_CONFIG_ALLOW_CROSS_x86_64-linux-android
cargo:rerun-if-env-changed=PKG_CONFIG_ALLOW_CROSS_x86_64_linux_android
cargo:rerun-if-env-changed=TARGET_PKG_CONFIG_ALLOW_CROSS
cargo:rerun-if-env-changed=PKG_CONFIG_ALLOW_CROSS
cargo:rerun-if-env-changed=PKG_CONFIG_x86_64-linux-android
cargo:rerun-if-env-changed=PKG_CONFIG_x86_64_linux_android
cargo:rerun-if-env-changed=TARGET_PKG_CONFIG
cargo:rerun-if-env-changed=PKG_CONFIG
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-linux-android
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_linux_android
cargo:rerun-if-env-changed=TARGET_PKG_CONFIG_SYSROOT_DIR
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
run pkg_config fail: pkg-config has not been configured to support cross-compilation.
Install a sysroot for the target platform and configure it via
PKG_CONFIG_SYSROOT_DIR and PKG_CONFIG_PATH, or install a
cross-compiling wrapper for pkg-config and set it via
PKG_CONFIG environment variable.
--- stderr
thread 'main' panicked at C:Usersbiche.cargoregistrysrcindex.crates.io-6f17d22bba15001fopenssl-sys-0.9.103buildfind_normal.rs:190:5:
Could not find directory of OpenSSL installation, and this `-sys` crate cannot
Make sure you also have the development packages of openssl installed.
For example, `libssl-dev` on Ubuntu or `openssl-devel` on Fedora.
If you're in a situation where you think the directory *should* be found
automatically, please open a bug at https://github.com/sfackler/rust-openssl
and include information about your system as well as this message.
$HOST = x86_64-pc-windows-msvc
$TARGET = x86_64-linux-android
openssl-sys = 0.9.103
I already have android studio and every requirement of that the documentation says but this just does not work. I am using windows 11 how can I fix this to be able run tauri for android.
I was using the crate reqwest which uses ssl by default apparently so so I fixed it by changing the dependency to reqwest = { version = "0.12.7", default-features = false, features = ["rustls-tls"] }