如何使用 Unity 为 Samsung Galaxy A12 创建 AR 应用程序?
我正在尝试使用 Unity 为我的 Android 手机创建 AR 应用程序:Samsung Galaxy A12,但不知何故它不起作用。
这是我的情况:
- 我使用 Unity 2021.1.0f1
- 我已将手机连接到运行 Unity 的笔记本电脑
- 我在手机上选择了开发者模式
- 我有 Android 软件包、ARCore、ARKit XR 插件和 AR Foundation(我我认为我没有使用)安装在Unity中
- 我使用Vuforia
- 我使用ARCore这可能会导致问题
- 我的场景仅包含定向光,ARCamera,图像目标和球体
- 当我在笔记本电脑上运行它时我的场景可以工作并且不会它应该做什么(只需点击播放,而不是在我的笔记本电脑上构建和运行),它在我放在相机前的一张纸上显示球体。
当我构建&运行 Unity 场景,我收到四个错误消息:
1:
ARMv7 is not compatible with the ARCore version included when using the "Include ARCore Library" option in the VuforiaConfiguration. To use an older version of ARCore which supports ARMv7, please include ARCore manually in your project instead.
UnityEngine.Debug:LogError (object)
Vuforia.EditorClasses.PlayerSettingsValidationResultExtensions:Log (System.Action`1<string>,string)
Vuforia.EditorClasses.PlayerSettingsValidationResultExtensions:Error (string)
Vuforia.EditorClasses.PlayerSettingsValidationResultExtensions:LogHighSeverity (Vuforia.EditorClasses.PlayerSettingsValidationResult)
PlayerSettingsValidationTask:Execute ()
BuildObserver/<>c:<OnPreprocessBuild>b__3_0 (Vuforia.EditorClasses.VuforiaLifeCycleTask)
System.Collections.Generic.List`1<Vuforia.EditorClasses.VuforiaLifeCycleTask>:ForEach (System.Action`1<Vuforia.EditorClasses.VuforiaLifeCycleTask>)
BuildObserver:OnPreprocessBuild (UnityEditor.Build.Reporting.BuildReport)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
2:
Error building Player: ARMv7 is not compatible with the ARCore version included when using the "Include ARCore Library" option in the VuforiaConfiguration. To use an older version of ARCore which supports ARMv7, please include ARCore manually in your project instead.
3:
Build completed with a result of 'Failed' in 0 seconds (318 ms)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
4:
UnityEditor.BuildPlayerWindow+BuildMethodException: 2 errors
at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x002ca] in <0e11587263324259967daac4d577d226>:0
at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in <0e11587263324259967daac4d577d226>:0
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
和一个警告:
Vulkan support is currently experimental in Vuforia Engine and therefore not fully supported.
UnityEngine.Debug:LogWarning (object)
Vuforia.EditorClasses.PlayerSettingsValidationResultExtensions:Log (System.Action`1<string>,string)
Vuforia.EditorClasses.PlayerSettingsValidationResultExtensions:Warn (string)
Vuforia.EditorClasses.PlayerSettingsValidationResultExtensions:LogHighSeverity (Vuforia.EditorClasses.PlayerSettingsValidationResult)
PlayerSettingsValidationTask:Execute ()
BuildObserver/<>c:<OnPreprocessBuild>b__3_0 (Vuforia.EditorClasses.VuforiaLifeCycleTask)
System.Collections.Generic.List`1<Vuforia.EditorClasses.VuforiaLifeCycleTask>:ForEach (System.Action`1<Vuforia.EditorClasses.VuforiaLifeCycleTask>)
BuildObserver:OnPreprocessBuild (UnityEditor.Build.Reporting.BuildReport)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
我认为可能是问题所在:
- 也许三星 Galaxy A12 与 Vuforia 不兼容。我可以上传场景而无需导入 Vuforia。我应该使用旧版本的 Vuforia 吗?
我的问题是:
- 如何在 Samsung Galaxy A12 上运行 Unity AR 场景?
I am trying to create an AR application with Unity for my Android phone: Samsung Galaxy A12, but somehow it does not work.
This is my situation:
- I use Unity 2021.1.0f1
- I have connected the phone to my laptop on which I am running Unity
- I have selected Developer Mode on my phone
- I have the Android packages, ARCore, ARKit XR Plugin and AR Foundation (which I think I do not use) installed in Unity
- I use Vuforia
- I use ARCore which probably causes the problem
- My scene contains only directional light, an ARCamera, Image Target and a sphere
- My scene works when I run it on my laptop and does what it should do (just hit play, NOT build & run on my laptop) which is showing the sphere on a piece of paper I hold in front of the camera.
When I Build & Run the Unity scene, I get four error messages:
1:
ARMv7 is not compatible with the ARCore version included when using the "Include ARCore Library" option in the VuforiaConfiguration. To use an older version of ARCore which supports ARMv7, please include ARCore manually in your project instead.
UnityEngine.Debug:LogError (object)
Vuforia.EditorClasses.PlayerSettingsValidationResultExtensions:Log (System.Action`1<string>,string)
Vuforia.EditorClasses.PlayerSettingsValidationResultExtensions:Error (string)
Vuforia.EditorClasses.PlayerSettingsValidationResultExtensions:LogHighSeverity (Vuforia.EditorClasses.PlayerSettingsValidationResult)
PlayerSettingsValidationTask:Execute ()
BuildObserver/<>c:<OnPreprocessBuild>b__3_0 (Vuforia.EditorClasses.VuforiaLifeCycleTask)
System.Collections.Generic.List`1<Vuforia.EditorClasses.VuforiaLifeCycleTask>:ForEach (System.Action`1<Vuforia.EditorClasses.VuforiaLifeCycleTask>)
BuildObserver:OnPreprocessBuild (UnityEditor.Build.Reporting.BuildReport)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
2:
Error building Player: ARMv7 is not compatible with the ARCore version included when using the "Include ARCore Library" option in the VuforiaConfiguration. To use an older version of ARCore which supports ARMv7, please include ARCore manually in your project instead.
3:
Build completed with a result of 'Failed' in 0 seconds (318 ms)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
4:
UnityEditor.BuildPlayerWindow+BuildMethodException: 2 errors
at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x002ca] in <0e11587263324259967daac4d577d226>:0
at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in <0e11587263324259967daac4d577d226>:0
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
And one warning:
Vulkan support is currently experimental in Vuforia Engine and therefore not fully supported.
UnityEngine.Debug:LogWarning (object)
Vuforia.EditorClasses.PlayerSettingsValidationResultExtensions:Log (System.Action`1<string>,string)
Vuforia.EditorClasses.PlayerSettingsValidationResultExtensions:Warn (string)
Vuforia.EditorClasses.PlayerSettingsValidationResultExtensions:LogHighSeverity (Vuforia.EditorClasses.PlayerSettingsValidationResult)
PlayerSettingsValidationTask:Execute ()
BuildObserver/<>c:<OnPreprocessBuild>b__3_0 (Vuforia.EditorClasses.VuforiaLifeCycleTask)
System.Collections.Generic.List`1<Vuforia.EditorClasses.VuforiaLifeCycleTask>:ForEach (System.Action`1<Vuforia.EditorClasses.VuforiaLifeCycleTask>)
BuildObserver:OnPreprocessBuild (UnityEditor.Build.Reporting.BuildReport)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
What I think might be the issue:
- Maybe the Samsung Galaxy A12 is not compatible with Vuforia. I can upload a scene without importing Vuforia. Should I use an older version of Vuforia?
My question is:
- How do I run an Unity AR scene on a Samsung Galaxy A12?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我找到了解决方案:安装旧版本的 Vuforia!我想我下载了 Vuforia 9
I found the solution: install an older version of Vuforia! I think I downloaded Vuforia 9