# 新版sdk报错\_不兼容问题

## **升级至sdk 1.1.1 及1.1.2的兼容问题**

| 眼镜os 25.8.29 + ARDK 1.1.2，slam及3dof接入方式修改，可参考下方解决相关问题 |
| ----------------------------------------------------- |

### **1. 头控模式选择**

当前版本，为适配兼容OpenXR，os 25.8.29以上版本更新了dof算法的接入模式，请参考下图切换所需要的模式：

1，DOF3为常规的3dof效果

2，DOF3\_WITH\_ABSOLUTE\_ORIENTATION 为3dof+磁力计绑定的效果，适合在涉及到固定指北方位的场景中；

3，SLAM为支持6dof的场景

故增加了 [头控模式配置](/rayneo-devdoc/x-xi-lie/unity-kai-fa/kuai-su-kai-shi/dao-ru-ardk-ji-pei-zhi.md#tou-kong-mo-shi-xuan-ze)，请查看

### **2. 6dof运行失败处理**

若你当前os为25.8.29，请更新系统runtime以支持6dof，9月以上版本则不需要

{% file src="/files/zXeaFBwTlWQezFRVNhMI" %}

## **升级至sdk 1.0.10 的兼容处理**

### **增加配置**

* 打包版本Android 12 （API level 31）

![](/files/db502961666e70bc664141ff74d033ae6568b95e)

* **勾选 Custom Launcher Gradle Template ，添加 kotlin 相关配置**

dependencies 中添加如下配置：

```
implementation "org.jetbrains.kotlin:kotlin-stdlib:1.8.22"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.22"
```

![](/files/4c45103080c0fd1a200e5d5f2f635a1633881ad2)

参考样例：

```
apply plugin: 'com.android.application'

dependencies {
    implementation project(':unityLibrary')
    implementation "org.jetbrains.kotlin:kotlin-stdlib:1.8.22" // 版本需与插件匹配
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.22"
    }

android {
    ndkPath "**NDKPATH**"

    compileSdkVersion APIVERSION
    buildToolsVersion '**BUILDTOOLS**'

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_11
        targetCompatibility JavaVersion.VERSION_11
    }

    defaultConfig {
        minSdkVersion MINSDKVERSION
        targetSdkVersion TARGETSDKVERSION
        applicationId '**APPLICATIONID**'
        ndk {
            abiFilters ABIFILTERS
        }
        versionCode VERSIONCODE
        versionName '**VERSIONNAME**'
    }

    aaptOptions {
        noCompress = BUILTIN_NOCOMPRESS + unityStreamingAssets.tokenize(', ')
        ignoreAssetsPattern = "!.svn:!.git:!.ds_store:!*.scc:!CVS:!thumbs.db:!picasa.ini:!*~"
    }SIGN

    lintOptions {
        abortOnError false
    }

    buildTypes {
        debug {
            minifyEnabled MINIFY_DEBUG
            proguardFiles getDefaultProguardFile('proguard-android.txt')SIGNCONFIG
            jniDebuggable true
        }
        release {
            minifyEnabled MINIFY_RELEASE
            proguardFiles getDefaultProguardFile('proguard-android.txt')SIGNCONFIG
        }
    }PACKAGING_OPTIONSPLAY_ASSET_PACKSSPLITS
BUILT_APK_LOCATION
    bundle {
        language {
            enableSplit = false
        }
        density {
            enableSplit = false
        }
        abi {
            enableSplit = true
        }
    }
}SPLITS_VERSION_CODE****LAUNCHER_SOURCE_BUILD_SETUP
```

### **OS版本过低**

若你当前眼镜os版本低于 **3.25.8.13**，且无法在线升级到最新版，则可下载以下server apk安装到眼镜中

{% file src="/files/CjJJBLab5ivBRgn2pIs6" %}

## **升级至sdk 1.0.7 的兼容处理**

### **OS版本过低**

若你当前眼镜os版本低于 **3.25.6.10**，且无法在线升级到最新版，则可下载以下server apk安装到眼镜中

{% file src="/files/Rci1Q8sJlUYs76BxOmcl" %}

### **原有旧工程上更新 SDK 开发的时候的注意**

由于 XR 下文件设置可能会对应变更，所以建议在导入新的 SDK 的时候，建议可以先删除 XR 文件夹下的设置文件，然后在导入新版本的 SDK ，XR 文件夹的文件会重新自动生成。

1、原有工程的 XR 文件夹内容

![](/files/b5b52d78c96ca50f55759043971b47170f199dbd)

2、Package Manager 移除老版本的SDK

![](/files/51a3693cf31fee3e07b82d1745dad0b4bee844ad)

3、删除 XR 相关的文件夹内容

![](/files/5d55a0b9289d8c31578f592099e7763608ed7df1)

4、在 Package Manager 中重新导入新版本的 SDK

![](/files/79004507b1629b016ea0486ee49ec30d8bb6dbce)

5、对应按照SDK导入步骤操作完成后，工程会重新生成 XR 文件夹相关内容

<figure><img src="/files/GoXHEjcmgnMAnP3XsDt9" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://rayneo.gitbook.io/rayneo-devdoc/chang-jian-wen-ti/faq/xin-ban-sdk-bao-cuo-bu-jian-rong-wen-ti.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
