# SDK FAQ

**本文提供 Air SDK 常见问题**

开发中遇到的许多问题，由兼容性引起。

在指定的硬件设备上，建议先安装 SDK 中已打包好的 apk 进行体验，以确认硬件状态正常。

然后，选择支持的 Unity 版本，加载 SDK 中的 Sample 工程，按照文档所述步骤进行设置，打包运行应用，以确认软件开发环境正常。

最后，可以开始开发自己的应用了。

#### 常见问题（持续更新中）

**1. 碰到 mainTemplate.gradle file is using the old apptOptions noCompress property definition which does not include types defined by unityStreamingAssets constant. 问题。**

答: 请在 Unity mainTemplate.gradle 文件下添加如下代码:

> noCompress = \['.ress', '.resource', '.obb'] + unityStreamingAssets.tokenize(', ')

**2. Unity 出现错误：**

> What went wrong:\
> \> Could not get unKnown property 'unityStreamingAssets' for object of type com.android.build.gradle.internal.dsl.AaptOptions.

答：打开 Build Setting，定位到 player->publishing settings->Build->选中 Custom Gradle Properties Template. 打开 Assets->Plugins->Android->gradleTemplate.properties 如果没有 unityStreamingAssets=这一行，添加：

> unityStreamingAssets=.unity3d, google-services-desktop.json, google-services.json, GoogleService-Info.plist

**3. APK 安装到手机的过程中需要进行安装安全性确认，或 ABI 确认问题。**

答：越来越多的 Android 设备开始使用 Android 11，并且其 ABI 通常遵循 arm64-v8a，兼容 armeabi-v7a, 通常建议在 Player settings->Other settings->Configuration->Target Architectures 选项下的 ARMv7 和 ARM64 两个选项同时选中。<br>

**4. 导入 sample 之后，射线点击控件无效？**

答：需要 reimport 一下 DLL， 路径在 ffalcon sdk->Runtime->Plugins->Android->UnityXRSDKCore.dll

![](https://testopen.rayneo.cn/media/058be01d-f519-491c-b9b6-6f4ce34a84d3.png)<br>

**5. 华为 mate 10 ,20 等手机,启动应用没有开启 unity 窗口,眼镜还停留在 Launcher 界面?**

答:这是因为华为的自动分辨率导致的,需要进入 设置->显示和亮度->屏幕分辨率->高. 即可![](https://testopen.rayneo.cn/media/115344_com.android.settings.jpg)

**6. 打包出错或者无法出包,unity 编译后会报空,并且 sdk 中有丢失的脚本.**

答:sdk 路径不能有中文

<br>


---

# 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/air-xi-lie/unity-kai-fa/kuai-su-kai-shi/sdk-faq.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.
