How to handle a missing plugin in NativeScript preview app

回眸只為那壹抹淺笑 提交于 2019-12-11 18:21:18

问题


I've built a basic layout app with NativeScript & Angular and am trying to preview it on my android device. when running

tns preview

I get a message saying that

Plugin nativescript-ng-shadow is not included in preview app on device {{Guid}} and will not work.

is there a way to include this plugin on the preview app, or does that mean that that i cannot preview this app?


回答1:


There are some limitations of what changes and applications are supported by Playground. The Preview app comes with a predefined list of built-in NativeScript plugins (see below). This means that apps using plugins with native code and/or resources which are not included, are not supported and cannot be run in the Playground’s Preview app. Moreover only application content files can be changed. Changes in App_Resources or the native parts of the plugins will not be applied.

More at Architecture of Playground / Preview app

Note: nativescript-ng-shadow plugin doesn't use any native libraries, hence you might be still able to use the plugin if you copy the npm module to your project root and import using relative path.



来源:https://stackoverflow.com/questions/56724758/how-to-handle-a-missing-plugin-in-nativescript-preview-app

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