Closed doums closed 1 year ago
The solution for openssl to be built successfully with tauri mobile is to have it installed locally and then in src-tauri/.cargo/config.toml add :
[env]
OPENSSL_DIR = '/opt/homebrew/opt/openssl@3.1'
AR = '/Users/$USER/Library/Android/sdk/ndk/25.0.8775105/toolchains/llvm/prebuilt/darwin-x86_64/bin/aarch64-linux-android-ar'
CC = '/Users/$USER/Library/Android/sdk/ndk/25.0.8775105/toolchains/llvm/prebuilt/darwin-x86_64/bin/aarch64-linux-android24-clang'`
Also have android studio and relevant prerequisites for tauri mobile installed.
The problem that I find with this is that it then builds successfully but tauri mobile gets stuck at the end and then fails with this error:
AndroidRuntime: java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "SSL_do_handshake" referenced by
That's for mac btw, of course see where openssl is installed and copy the path to it. If you have any insight on the following problem after please let me know, thanks.
Closing this by #143
@Zack-Xb I met the same problem, have you solved the problem?
Describe the bug
Hi, it seems when building with the vendored Openssl, it makes the build fail on android.
I bootstrapped a simple tauri mobile project example to reproduce the issue.
Steps To Reproduce
install latest tauri-cli alpha
cargo install tauri-cli --version "2.0.0-alpha.8"
npm i
cd src-tauri
cargo clean
rm -rf gen
cargo tauri android init
cargo tauri android dev
Expected behavior It should build successfully and launch the app
Platform and Versions (please complete the following information):
stack trace (shortened)