首页 > 解决方案 > 错误:统一到xcode;架构 arm64 的未定义符号:

问题描述

现在,我正在制作一个统一的增强现实。我尝试使用 x-code 进行构建。但我收到以下错误。如果你有类似的经历,请给我建议。Mu Unity 的构建设置为 ARM46

●Error:
Undefined symbols for architecture arm64:
 "_OBJC_CLASS_$_ARObjectScanningConfiguration", referenced from:
   objc-class-ref in ARKitNativeObjectDetection.o
 "_OBJC_CLASS_$_ARObjectAnchor", referenced from:
   objc-class-ref in ARKitNativeObjectDetection.o
 "_OBJC_CLASS_$_ARPointCloud", referenced from:
   objc-class-ref in ARPointCloud.o
 "_OBJC_CLASS_$_AREnvironmentProbeAnchor", referenced from:
   objc-class-ref in ARSessionNative.o
   objc-class-ref in AREnvironmentProbe.o
 "_OBJC_CLASS_$_ARWorldTrackingConfiguration", referenced from:
   objc-class-ref in ARSessionNative.o
 "_OBJC_CLASS_$_ARReferenceImage", referenced from:
   objc-class-ref in ARSessionNative.o
 "_OBJC_CLASS_$_AROrientationTrackingConfiguration", referenced from:
   objc-class-ref in ARSessionNative.o
 "_OBJC_CLASS_$_ARImageAnchor", referenced from:
   objc-class-ref in ARSessionNative.o
 "_OBJC_CLASS_$_ARAnchor", referenced from:
   objc-class-ref in ARSessionNative.o
 "_OBJC_CLASS_$_ARWorldMap", referenced from:
   objc-class-ref in ARWorldMap.o
   objc-class-ref in ARSessionNative.o
   objc-class-ref in ARKitNativeObjectDetection.o
 "_OBJC_CLASS_$_ARPlaneAnchor", referenced from:
   objc-class-ref in ARSessionNative.o
 "_OBJC_CLASS_$_ARSession", referenced from:
   objc-class-ref in ARSessionNative.o
 "_OBJC_CLASS_$_ARReferenceObject", referenced from:
   objc-class-ref in ARWorldMap.o
   objc-class-ref in ARSessionNative.o
   objc-class-ref in AREnvironmentProbe.o
   objc-class-ref in ARKitNativeObjectDetection.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

标签: xcodeaugmented-reality

解决方案


它缺少图书馆。

在您的 Unity3D 项目中,请确保已启用 XR。

如果您使用的是最新版本的 Unity3D,则必须在 Project Settings 中启用 ARKit Build Settings。同时,在 XR Plug-in Management(iOS) 中,您必须将 ARKit 切换为 Plug-in Providers。

当然,不要忘记在构建设置中添加相机使用说明。


推荐阅读