During the 1.12 beta, I built and ran code this for Android without problems:
[package]
name = "android"
version = "0.1.0"
authors = ["Author <[email protected]>"]
build = "build.rs"
[lib]
name = "mylib"
crate-type = ["cdylib"]
I use rustup and rustup target add arm-linux-androideabi
.
Now when I load my Rust 1.12 library from Java code I get:
java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol “rust_begin_unwind”
To temporarily fix this, I need a workaround:
#[allow(unused_variables)]
#[no_mangle]
pub extern
fn rust_begin_unwind(fmt: ::std::fmt::Arguments, file: &'static str, line: u32) -> ! {
loop {}
}
- Why did unwinding become unavailable on the Android platform?
- How to fix this properly? When debugging, I want to see the full stack trace
in the Android IDE log window.
Tags: androidandroid