Monado&&openxr

2022-03-23  本文已影响0人  赛非斯

首先把它下载下来
git clone https://gitlab.freedesktop.org/monado/monado.git

出现的第二个报错是eigen 找不到 ,所以我们去官方下载了eigen-3.4.0.zip然后把路径配置到项目下面
eigenIncludeDir=D:\Tools\eigen-3.4.0\eigen-3.4.0

image.png

编译生成的文件确实有这个


image.png

打开查看里面是so路径


image.png
E/openxr_loader: Could access neither the installable nor system runtime broker.
E/OpenXR-Loader: Error [GENERAL |  | OpenXR-Loader] : RuntimeManifestFile::FindManifestFiles - failed to determine active runtime file path for this environment
image.png
-编译 安装openxr-android-broker
Monado / Utilities / openxr-android-broker · GitLab
这里有个权限要求暂时不知道咋解决,先删掉验证
image.png

编译一个opengl的试试


image.png

这俩问题就很简单了,至少openxr的例子跑起来了

I/openxr_loader: getActiveRuntimeCursor: Querying URI: content://org.khronos.openxr.runtime_broker/openxr/1/abi/arm64-v8a/runtimes/active/0
V/threaded_app: Start: 0x7edf91bbc0
I/OpenXR-Loader: Got runtime: package: org.freedesktop.monado.openxr_runtime.in_process, so filename: /data/app/org.freedesktop.monado.openxr_runtime.in_process-lhEeNT0DMOpyyth7Ri37ow==/lib/arm64, native lib dir: libopenxr_monado.so, has functions: no
I/OpenXR-Loader: Info [GENERAL | xrEnumerateInstanceExtensionProperties | OpenXR-Loader] : RuntimeInterface::LoadRuntime forwarding xrInitializeLoaderKHR call to runtime after calling xrNegotiateLoaderRuntimeInterface.
    Info [GENERAL | xrEnumerateInstanceExtensionProperties | OpenXR-Loader] : RuntimeInterface::LoadRuntime succeeded loading runtime defined in manifest file  using interface version 1 and OpenXR API version 1.0
V/OpenXR-Loader: Verbose [GENERAL | xrEnumerateInstanceExtensionProperties | OpenXR-Loader] : Completed loader trampoline
    Verbose [GENERAL | xrEnumerateInstanceExtensionProperties | OpenXR-Loader] : Entering loader trampoline
    Verbose [GENERAL | xrEnumerateInstanceExtensionProperties | OpenXR-Loader] : Completed loader trampoline
    Verbose [GENERAL | xrEnumerateApiLayerProperties | OpenXR-Loader] : Entering loader trampoline
    Verbose [GENERAL | xrEnumerateApiLayerProperties | OpenXR-Loader] : Entering loader trampoline
V/hello_xr: [09:37:07.678][Info   ] Available Layers: (0)
V/OpenXR-Loader: Verbose [GENERAL | xrCreateInstance | OpenXR-Loader] : Entering loader trampoline
    Verbose [GENERAL | xrCreateInstance | OpenXR-Loader] : Entering LoaderInstance::CreateInstance
    Verbose [GENERAL | xrCreateInstance | OpenXR-Loader] : Entering loader terminator
V/threaded_app: activityState=10
V/hello_xr: [09:37:07.678][Info   ]     APP_CMD_START
V/hello_xr: [09:37:07.678][Info   ] onStart()
V/threaded_app: Resume: 0x7edf91bbc0
V/threaded_app: activityState=11
V/hello_xr: [09:37:07.680][Info   ] onResume()
    [09:37:07.680][Info   ]     APP_CMD_RESUME

下面提供下升级方法:这样就可以愉快的使用最新版本的studio了

ndex db6d05fb..316ce244 100644
--- a/build.gradle
+++ b/build.gradle
@@ -14,7 +14,7 @@ buildscript {
         androidxLifecycleVersion = "2.2.0"
         androidxConstraintLayoutVersion = '2.0.4'

-        hiltVersion = '2.35.1'
+        hiltVersion = '2.40.1'

         materialVersion = "1.3.0"
     }
@@ -23,7 +23,7 @@ buildscript {
         mavenCentral()
     }
     dependencies {
-        classpath 'com.android.tools.build:gradle:4.2.1'
+        classpath 'com.android.tools.build:gradle:7.2.0'
         //noinspection DifferentKotlinGradleVersion
         classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
         classpath "com.mikepenz.aboutlibraries.plugin:aboutlibraries-plugin:${latestAboutLibsRelease}"
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 442d9132..2e6e5897 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,5 +1,5 @@
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists

上一篇 下一篇

猜你喜欢

热点阅读