-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Android example fails to run: UnsatisfiedLinkError #4103
Comments
Hi! Here is what I found out so far:
I also added a new section [package.metadata.android.application]
icon = "@mipmap/ic_launcher"
label = "Bevy Example" I moved the Now, the app appears correctly in the application list. Assets are included again. I checked via adb, the Btw. I think #4295 might be related to this issue. At least the second part of the error message is the same. Maybe there are some other breaking changes from android-ndk-rs / cargo-apk? Or is |
some people have been able to run on android with #4139 |
Thanks! Will have a look into it. |
I was actually just reinstalling my linux machine to test if this(#4295) was happening elsewhere too. I ran into the exact link error Vi ran into. @konradmoesch the Rust code doesn't seem to be loading at all and it's purely a Java error at the moment. It's not saying the file doesn't exist, but it's saying the symbol doesn't exist. Between this and #4295 though, it's complaining about different symbols depending on which OS is compiling. |
Hm okay, but the libandroid.so is the compiled rust code, right? I am new to Bevy and also quite new to rust (started maybe one year ago), sorry. But I'd love to get a bit more into it. |
I'm in the same boat really, much greener though(a month or so). From what I can gather, the assumption that it's an upstream issue from cargo-apk makes sense. It's building the .so file, and the device reports only missing symbols. It may also be the toolchain issue as well. I'm currently using nightly(mainly because the rust-analyzer) so maybe the toolchain messing the builds up? I'll see if I can get the stable Rust to work. I'm going to also try quadmacro and see if that works and maybe see what is done differently if it does. |
I manually linked libc++_shared.so as described in this answer. Edit: |
Jinx. I just did the link this morning too. I found that screenshot posted on several Rust projects. I'm looking into 4139 now. Now that we are getting something Rust launching, the rest should be easy. |
This issue should be closed with katyo/oboe-rs#28 (comment) as the solution. Now I'm running into the unwrap error now, though on a different line. Time to chase this down. |
I can't find this. All the Bevy forks I have found all fail in the same way without the build.rs fix. |
I mean this branch by ManevilleF (pull req #4139) |
# Objective - Merge the examples on iOS and Android - Make sure they both work from the same code ## Solution - don't create window when not in an active state (from #6830) - exit on suspend on Android (from #6830) - automatically enable dependency feature of bevy_audio on android so that it works out of the box - don't inverse y position of touch events - reuse the same example for both Android and iOS Fixes #4616 Fixes #4103 Fixes #3648 Fixes #3458 Fixes #3249 Fixes #86
# Objective - Merge the examples on iOS and Android - Make sure they both work from the same code ## Solution - don't create window when not in an active state (from #6830) - exit on suspend on Android (from #6830) - automatically enable dependency feature of bevy_audio on android so that it works out of the box - don't inverse y position of touch events - reuse the same example for both Android and iOS Fixes #4616 Fixes #4103 Fixes #3648 Fixes #3458 Fixes #3249 Fixes #86
Bevy version
b6a647c
Operating system & version
Building on Linux x86_64 for Android.
What you did
Followed the https://github.com/bevyengine/bevy/tree/latest/examples#android,
but with
cargo apk build --example android
, with manual installation of tha apk.The 215-megabyte "android" application appeared on the device. But upon starting it the window immediately closes.
What you expected to happen
Some Android view with some UI appears
What actually happened
Additional information
Running on Pixel 3 XL with Android 11.
rustc 1.60.0-nightly (0c292c966 2022-02-08)
The text was updated successfully, but these errors were encountered: