How to install plugin in cordova. There is no Plugin folder for cordova, only in phoneGap

徘徊边缘 提交于 2020-01-25 00:23:48

问题


I have downloaded the latest Cordova 3.4.0-rc1. I can run it using Windows Phone emulator in Visual Studio 2013. Now how do I install plugin like Accelerometer, Battery that already included in the phoneGap framework? I cannot find the documentation about it. The reason why I use Cordova instead of phoneGap is because phoneGap has not updated their framework since 5th November 2013 and from what I have heard that there is not much different between these 2 frameworks

update my question:

I followed this step when installing cordova for Windows Phone 8 (without using terminal). I cannot figure out where is the plugin files in the template: https://cordova.apache.org/docs/en/3.0.0/guide_platforms_wp8_index.md.html

The only solution (not that I want ) is that I have to use phoneGap instead of cordova. I'm trying to call the API to show device version such as console.log(device.version); but it doesn't work when using cordova because of missing plugin that needs to be installed manually but it does work on phoneGap. Any idea how to install Cordova for Windows Phone plugin manually?


回答1:


I have similar problem to this guy:

https://groups.google.com/forum/#!topic/phonegap/LcBjwm5wypI

After searching and reading some posts, it seems like the current official documentation about setting up cordova is worst and useless. I solve this problem from this thread:

Phonegap Cordova installation Windows




回答2:


you just need to fire cordova plugin add [plugin name] in terminal and the plugin will be added for you.

What are the steps you followed to install cordova? Which OS are you using?

Also check inside your www folder, maybe the plugin folder is there.



来源:https://stackoverflow.com/questions/22827585/how-to-install-plugin-in-cordova-there-is-no-plugin-folder-for-cordova-only-in

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