Replies: 3 comments 16 replies
-
#1952 was merged about 1 month before your example ran, I believe these changes are still not released. Try to update your toml file to point to egui master and see if android works as expected. Let me know if it does, I'm personally curious. @rib am I matching up the error above with your work correctly? |
Beta Was this translation helpful? Give feedback.
-
I'm approaching this from the iOS side of things but will ultimately need to answer these questions on android. Other things I would look into are: |
Beta Was this translation helpful? Give feedback.
-
I've been working on writing an eframe app for android. It's pretty simple, things mostly just work as-is with eframe: expenses/android-eframe@a65a3f0. |
Beta Was this translation helpful? Give feedback.
-
I would like to apologize in advance, because this is probably a very noob question, but I am fairly new to Rust and have little to no idea how android apps work.
My goal is to build a Rust app for android, but I would like to refrain from using android studio and just code in pure rust. I recently found out about
cargo-apk
, and using it wanted to build my app for phone. As a start I was trying to just run hello-world example from egui's repo, by adding#[cfg_attr(target_os = "android", ndk_glue::main(backtrace = "on"))]
tomain
function, and runningcargo apk run --lib
with started emulator.Here is the whole code:
The programm starts, it also even outputs
prinln!
s to log, but then the log gives methread '<unnamed>' panicked at 'Cannot get the native window, it's null and will always be null before Event::Resumed and after Event::Suspended. Make sure you only call this function between those events.'
, which I consider that my rust code died and that's it.Can someone explain to me if it's
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions