问题
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