How to deploy nativescript-barcodescanner in typescript?

寵の児 提交于 2020-01-30 11:50:28

问题


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.

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.

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


回答1:


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

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.



来源:https://stackoverflow.com/questions/57368317/how-to-deploy-nativescript-barcodescanner-in-typescript

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!