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

APK error on example x builds #124

Open
jreuben11 opened this issue Jun 19, 2024 · 1 comment
Open

APK error on example x builds #124

jreuben11 opened this issue Jun 19, 2024 · 1 comment

Comments

@jreuben11
Copy link

jreuben11 commented Jun 19, 2024

when compiling examples for quest, I get the following error:

[3/3] Create apk
Error: Failed to collect all required libraries for /bevy_oxr/examples/android/runtime_libs/arm64-v8a/libopenxr_loader.so Shared library libm.so.6` not found

UPDATE 1:
After installing Android SDK and NDK:

in ~/Code/git_clones/bevy_oxr/examples/android
running x build --release

I get:

[2/3] Build rust `bevy_openxr_android` [98ms]
[3/3] Create appimage
Error: failed to locate bin ~/Code/git_clones/bevy_oxr/target/x/release/linux/x64/cargo/release/bevy_openxr_android

target/x/release/linux/x64/cargo/release exists but does not contain bevy_openxr_android or bevy_openxr

when I try RUST_BACKTRACE=1 cargo apk build --release
I get:

Using package `bevy_openxr_android` in `~/Code/git_clones/bevy_oxr/examples/android/Cargo.toml`
thread 'main' panicked at ~/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ndk-build-0.10.0/src/ndk.rs:89:14:
Failed to read source.properties: Os { code: 2, kind: NotFound, message: "No such file or directory" }
stack backtrace:
   0: rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::result::unwrap_failed
   3: ndk_build::ndk::Ndk::from_env
   4: cargo_apk::apk::ApkBuilder::from_subcommand
   5: cargo_apk::main
@jreuben11 jreuben11 changed the title APK error on example builds APK error on example x builds Jun 20, 2024
@ChristianSchott
Copy link

I know this issue is old, but maybe this helps someone..

For building an apk with xbuild, you have to specify the target platform:
x build --release -p bevy_openxr_android --platform android --arch arm64 --format apk

Regarding the error with cargo-apk, it seems like your ANDROID_NDK_ROOT environment variable is not set, or set incorrectly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants