如何在Typescript中部署nativescript-barcodescanner? [英] How to deploy nativescript-barcodescanner in typescript?

查看:60
本文介绍了如何在Typescript中部署nativescript-barcodescanner?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I am trying to run demo from https://github.com/EddyVerbruggen/nativescript-barcodescanner/tree/master/demo both locally and online at https://play.nativescript.org/?template=play-tsc&id=CB7XFu&v=2 but no luck. On the playground I have added the plugin.

我注意到这里有一个类似的问题如何使用NativeScript的BarcodeScanner插件,但似乎已经3年了,此后插件发生了很大变化.

I noticed there is a similar question here How to use BarcodeScanner plugin from NativeScript but seems it's 3 years before and the plugin changed a lot after that.

有人可以在操场上告诉我哪条线路错了吗?我严格按照github中的演示进行操作.错误消息是找不到变量:QRCodeReaderDelegate

Can anyone try the playground and tell which line I got wrong? I strictly followed the demo in github. The error message is Can't find variable: QRCodeReaderDelegate

推荐答案

使用Playground(在线)或Preview命令(本地),您不能使用需要本地依赖性的插件,例如条形码扫描仪.

With Playground (online) Or Preview command (locally), You can not use plugin those require native dependency such as Barcode Scanner.

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

You will have to build the project using tns [run|build] commands locally, only then the native dependencies will be installed and you will be able to run them successfully.

这篇关于如何在Typescript中部署nativescript-barcodescanner?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆