【问题标题】:How to deploy nativescript-barcodescanner in typescript?如何在打字稿中部署 nativescript-barcodescanner?
【发布时间】:2019-08-06 02:55:27
【问题描述】:

我正在尝试从https://github.com/EddyVerbruggen/nativescript-barcodescanner/tree/master/demo 本地和在线https://play.nativescript.org/?template=play-tsc&id=CB7XFu&v=2 运行演示,但没有运气。在操场上我已经添加了插件。

我注意到How to use BarcodeScanner plugin from NativeScript 这里有一个类似的问题,但似乎是 3 年前的事了,此后插件发生了很大变化。

谁能在操场上试一试,告诉我哪条线错了?我严格按照 github 中的演示进行操作。错误信息是Can't find variable: QRCodeReaderDelegate

【问题讨论】:

    标签: typescript nativescript barcode-scanner


    【解决方案1】:

    使用 Playground(在线)或 Preview 命令(本地),您不能使用需要本机依赖的插件,例如 Barcode Scanner。

    您必须在本地使用tns [run|build] 命令构建项目,然后才能安装本机依赖项并且您将能够成功运行它们。

    【讨论】:

      猜你喜欢
      • 2019-08-30
      • 2023-04-05
      • 2020-08-20
      • 2016-09-05
      • 2019-05-26
      • 1970-01-01
      • 2023-03-03
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多