Blaze
Blaze

Reputation: 2329

Cordova: Cannot find plugin.xml

I am trying to remove this plugin from my coordova file and I am getting this issues

Error: Cannot find plugin.xml for plugin 'org.apache.cordova.file-transfer'. Please try adding it again.

This is the cordova command to remove the plugin

cordova plugin rm cordova-plugin-file-transfer

Please assist on why I cannot be able to remove this plugin. Thank you

Upvotes: 18

Views: 25864

Answers (7)

Nick JR
Nick JR

Reputation: 1

I faced this issue too. I removed all platforms first. Then I removed the plugin and re-added the platforms. This method works for me.

cordova platform remove android

cordova platform remove ios

cordova plugin rm 'plugin-name'

cordova platform add android

cordova platform add ios 

Upvotes: -1

Edvan Souza
Edvan Souza

Reputation: 1118

To solve this error I copy all file from node_module/cordova-plugin-fingerprint-aio paste it to plugins/cordova-plugin-fingerprint-aio. Then I remove the plugin and I have added it again.

Upvotes: 0

Higg_kaz
Higg_kaz

Reputation: 65

Faced the same issue when building out my app in Ionic 3. The steps I followed to clear this issue include:

  1. Check what Cordova Plugins are already installed on the App using -cordova plugin list in your CLI
  2. Delete any Plugin that are not listed in Step(1) from your Apps plugins folder in your applications directory ie.deleting folder of this plugin from plugins folder
  3. Try and build again.

Upvotes: 4

Muhammad Awais
Muhammad Awais

Reputation: 1966

In my Ionic app, I was facing this issue with cordova-plugin-android-permissions plugin. Simply deleting folder of this plugin from plugins folder solved my issue

Upvotes: 9

Mubashir AR
Mubashir AR

Reputation: 86

To add to jshaw.fb's answer, remove those lines from browser.json as well

Upvotes: 1

writofmandamus
writofmandamus

Reputation: 1231

First, make sure the plugin isn't listed in your config.xml. Then you can reinstall the platform for example for Android you will enter the following in the command line for your project:

cordova platform remove android

cordova platform add android

Upvotes: 9

user5578554
user5578554

Reputation:

I ran into this issue while trying to upgrade a plugin.

Start by deleting the plugin folder <myapp>/plugins/cordova-plugin-file-transfer as suggested by this post. If the plugin still cannot be removed via cordova, edit the 3 json files in <your_app>/plugins and removed all references to cordova-plugin-file-transfer.

---- removed from android.json ----

"cordova-plugin-file-transfer": {
    "PACKAGE_NAME": "com.mycompany.myapp"
}

---- removed from ios.json ----

"cordova-plugin-file-transfer": {
    "PACKAGE_NAME": "com.mycompany.myapp"
}

---- removed from fetch.json ----

"cordova-plugin-file-transfer": {
    "source": {
       "type": "registry",
        "id": "cordova-plugin-file-transfer"
    },
    "is_top_level": true,
    "variables": {}
}

Cordova will now recognize that the plugin is not installed. This solved my update issue as I was finally able to run cordova plugin add cordova-plugin-file-transfer without getting an error.

Upvotes: 32

Related Questions