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

后端 未结 5 2012
孤街浪徒
孤街浪徒 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:04

    Since cordova 3.5, we can persist plugins in config.xml file

    
        
        
    
    

    The following command will fetch the plugins defined in config.xml

    cordova restore plugins --experimental
    

    The following command will write your current installed plugins in config.xml (3.5):

    cordova save plugins --experimental
    

    In 5.x and later:

    cordova plugin save
    

    Source: http://cordova.apache.org/news/2014/07/10/tools-release.html

提交回复
热议问题