Should a phonegap plugin be declared in the config.xml file?

后端 未结 5 2006
孤街浪徒
孤街浪徒 2020-11-28 18:21

I am a newbie in phonegap development so I have a couple of questions:

1) I am using the accelerometer plug-in. I read in the manual that i need to declare the plugi

5条回答
  •  迷失自我
    2020-11-28 19:03

    Since Cordova 5.0, yes.

    
        ...
        
        ...
    
    

    Mass saving plugins on an existing project :

    $ cordova plugin save
    

    On a fresh install (or after a clean), you can add all plugins with :

    $ cordova prepare
    

    Adding / updating / removing can also be done via cli :

    $ cordova plugin add ] | directory | git_url> --save
    $ cordova plugin update ] | directory | git_url> --save
    $ cordova plugin remove  --save
    

    There is no mass update for the moment. You can remove plugins directory then run a $cordova prepare.

    Sources :

    • http://cordova.apache.org/docs/en/5.1.1/platform_plugin_versioning_ref_index.md.html
    • https://cordova.apache.org/news/2015/04/21/tools-release.html

提交回复
热议问题