Thank you for trying out our command-line interface offering. Unfortunately, the workflow you have picked up might be what is causing the problem. It also appears that you are running an outdated version of the CLI since you have used the fetch-plugin command which is now deprecated and transformed into the plugin fetch command.
The best course of action would be to first update your installation
by running $ npm install -g appbuilder.
Next, you should consider the following. The Device plugin is considered a core plugin and should be enabled/disabled via the $ appbuilder prop command. When you fetched it from the official repository, you have probably created a conflict between the plugins in your project. On the one hand, you have the Device plugin enabled as a core plugin in your project properties and on the other - you have just added it as a custom plugin.
What you can do is either disable the core plugin OR remove the "custom" one.
To disable the device core plugin, run $ appbuilder prop remove CorePlugins org.apache.cordova.device
To remove the device custom plugin, just empty the Plugins folder in your project.
And now to your code - we cannot identify what the problem might be without your complete project or a sample code snippet that shows where and how you're calling the alert. Please, either attach your code or prepare a jsFiddle
with your code so that we can examine it and check how it works.
Regarding your last question about adding a plugin - it depends almost entirely on the type of plugin.
For the core/integrated plugins (that is all core Apache Cordova APIs, the BarcodeScanner, the SQLite, the PushPlugin, the Telerik Mobile Testing, the Telerik Analytics, and the Telerik AppFeedback plugins, run $ appbuilder prop add|remove CorePlugins <plugin ID>
. To get the available plugin IDs, run $ appbuilder prop add --help
and examine the CorePlugins section. You do not need to reference these in your index.html.
For custom plugins, you need to run $ appbuilder plugin fetch
. After the CLI fetches the plugin, it places it in the Plugins folder in your project. You would need to examine your plugin.xml to find out if you need to reference the plugin in your project. For more information, see this article
Let us know if you need further assistance.
Share what you think about AppBuilder and Telerik Platform with us in our feedback portal, so we can become even better!