繁体   English   中英

HoloLens中的QR扫描-DLL错误

[英]QR Scanning in HoloLens - DLL errors

我正在尝试从HoloLens内部实现QR码阅读器,以Mike Taulty的解决方案( https://mtaulty.com/2016/12/28/windows-10-uwp-qr-code-scanning-with-zxing-和hololens / )。 但是,我在构建项目时遇到了一个问题,因为我收到一个构建错误: "Assets\\Placeholder.cs(20,9): error CS0103: The name 'MediaFrameQrProcessing' does not exist in the current context" ,这似乎意味着DLL无法正常工作? 在我的项目中已经有一个同名的DLL,并且我认为该DLL可以解决此问题,但事实并非如此。

我正在运行Unity 2018.4.1和Visual Studio2019。我在他的GitHub存储库( https://github.com/mtaulty/QrCodes )之上构建。

这是引发构建错误的块。 MediaFrameQrProcessing

public void OnScan()
    {
        this.textMesh.text = "scanning for 30s";
        #if !UNITY_EDITOR
        MediaFrameQrProcessing.Wrappers.ZXingQrCodeScanner.ScanFirstCameraForQrCode(
            result =>
            {
                UnityEngine.WSA.Application.InvokeOnAppThread(() =>
            {
                  this.textMesh.text = result ?? "not found";
              },
            false);
            },
            TimeSpan.FromSeconds(30));
        #endif
    }

预期:没有事件的项目构建

实际结果: Assets\\Placeholder.cs(20,9): error CS0103: The name 'MediaFrameQrProcessing' does not exist in the current context构建错误Assets\\Placeholder.cs(20,9): error CS0103: The name 'MediaFrameQrProcessing' does not exist in the current context 这应该包含在DLL中

导入设置的屏幕截图:

DLL导入设置

建议尝试使用unity2017进行构建。 我使用unity2017.4.31f1在存储库中构建了unity项目,它似乎工作正常。

更新:

我使用2018.4.3创建了一个新项目并进行了一些简单的测试,使用这样的导入设置后未引发此错误。

在此处输入图片说明

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM