OpenXR-SDK-Source icon indicating copy to clipboard operation
OpenXR-SDK-Source copied to clipboard

Build android version

Open Leon-Zhang opened this issue 2 years ago • 5 comments

Hello, I need to build openxr android version, but I didn't find Android.mk files etc which required to build with ndk, does openxr support android? Thanks in advance.

Leon-Zhang avatar May 23 '22 00:05 Leon-Zhang

An issue (number 1725) has been filed to correspond to this issue in the internal Khronos GitLab (Khronos members only: KHR:openxr/openxr#1725 ), to facilitate working group processes.

This GitHub issue will continue to be the main site of discussion.

rpavlik-bot avatar May 28 '22 03:05 rpavlik-bot

@Leon-Zhang This project use Gradle and CMake to build OpenXR Android build. You can run ./gradlew :src:tests:hello_xr:build to build everything of this project shortly.

utzcoz avatar May 28 '22 04:05 utzcoz

@utzcoz Thanks very much for reply. I tried generate gradlew using gradle wrapper command, and then ./gradlew :src:tests:hello_xr:build in root folder, but I get

$ ./gradlew :src:tests:hello_xr:build

FAILURE: Build failed with an exception.

* What went wrong:
Project 'src' not found in root project 'OpenXR-SDK-Source'.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 2s

How I can fix this? thanks.

Leon-Zhang avatar May 29 '22 15:05 Leon-Zhang

@Leon-Zhang You can check https://github.com/KhronosGroup/OpenXR-SDK-Source/blob/main/.github/workflows/android-helloxr-ci.yml#L23-L31 for CI building. I can confirm it works correctly.

utzcoz avatar May 29 '22 15:05 utzcoz

@Leon-Zhang There is no need to manually generate gradlew first and then use it to compile hello-xr. You just need to execute ./gradlew build in the hello-xr directory.

~/OpenXR-SDK-Source/src/tests/hello_xr$ ./gradlew build

cuncaojin avatar Oct 13 '22 22:10 cuncaojin