rust-mobile/ndk

cargo apk run --lib spits out tons of compile error - some std types are missing

switefaster opened this issue · 1 comments

I followed the instruction in README and tried to compile the things with cargo apk run --lib, but only to get tons of compile errors like

error[E0531]: cannot find tuple struct or tuple variant `Some` in this scope
    --> C:\Users\switefaster\.cargo\registry\src\mirrors.ustc.edu.cn-61ef6e0cd06fb9b8\once_cell-1.13.0\src\lib.rs:1298:9
     |
1298 |         Some(it) => it,
     |         ^^^^ not found in this scope

It seems that std types such as Option Send Sync are missing. However cargo run works just as intended, what is causing this? Is there any workaround?

Sorry for this, I found I forgot to install the android targets. rustup target add will fix this. Closing,