简体   繁体   中英

cannot uninstall Cordova plugin

In my Ionic app, I just uninstalled a Cordova plugin this way :

$ cordova plugin remove phonegap-facebook-plugin

Uninstalling phonegap-facebook-plugin from android

but when I list the plugins it still appears as installed :

$ cordova plugins
cordova-plugin-googleplayservices 19.0.3 "Google Play Services for Android"
cordova-plugin-googleplus 4.0.3 "Google+"
cordova-plugin-whitelist 1.1.1-dev "Whitelist"
ionic-plugin-keyboard 1.0.7 "Keyboard"
phonegap-facebook-plugin 0.12.0 "Facebook Connect"

Can help me figure this out ?

Thanks

请手动从plugin文件夹中删除phonegap-facebook-plugin

the problem is you have to use the --save flag when you run the cordova plugin rm command. cordova plugin remove phonegap-facebook-plugin --save

This --save flag tells the compiler to also remove it from config.xml , where all the plugins are listed. When you don't pass the --save flag, the plugin entry remains in the config.xml and thus when you run: "cordova plugins ls", your plugin is still there..

This should be highlighted more clearly in the official cordova docs..

A). You can directly delete plugin from plugin directory.

  1. got to project/directory/plugin.
  2. Choose plugin you want to delete.
  3. Remove from there.

B). On obuntu or mac

 1. open terminal (ctrl+t).
 2. $ cd project/directory/plugin.
 3. $ rm -rf plugin-name-to-be-remove.

C). Cordova Command

 1. $ cd project/directory/plugin.
 2. $  cordova plugin remove cordova-plugin-name

This may help you..

You can directly delete the plugin from plugin folder or use the cordova plugin remove plugin-name You can find the list of plugin by this command cordova plugin list

Sometime this make a great issue that the plugin part also remains in the platform folder. So you can remove the platform and add the platform again.

You can remove any cordova plugin forcefully by using below command,

cordova plugin remove phonegap-facebook-plugin--force

then try to remove all platforms using below command,

cordova platform remove <platform_name>

then try to add platforms again using below command,

cordova platform add <platform_name>

Finally prepare project using below command,

cordova prepare

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM