Search code examples
cordovaionic-frameworkcordova-plugins

Cordova Plugin downloading always on Build and Run


I am new in Cordova and IONIC framework, Whenever I build or run the cordova application, this cordova plugin is always getting cloned/downloaded from git-

ionic-plugins-keyboard

enter image description here

I mean every time on each build, here is the full list of cordova plugins which are listed in the config.xml file, no other plugin gets cloned but only this one.

    <plugin name="cordova-plugin-console" spec="^1.0.1" />
    <plugin name="cordova-plugin-device" spec="^1.0.1" />
    <plugin name="cordova-plugin-dialogs" spec="^1.1.1" />
    <plugin name="cordova-plugin-globalization" spec="^1.0.1" />
    <plugin name="cordova-plugin-extension" spec="^1.1.4" />
    <plugin name="com.synconset.imagepicker" spec="https://github.com/startapplabs/cordova-imagePicker.git" />
    <plugin name="nl.x-services.plugins.socialsharing" spec="^4.3.19" />
    <plugin name="cordova-plugin-inappbrowser" spec="^1.0.1" />
    <plugin name="com.rjfun.cordova.iad" spec="^2.0.4" />
    <plugin name="cordova-plugin-admobpro" spec="^2.8.3" />
    <plugin name="cordova-plugin-whitelist" spec="^1.0.0" />
    <plugin name="de.appplant.cordova.plugin.email-composer" spec="https://github.com/katzer/cordova-plugin-email-composer.git" />
    <plugin name="org.pushandplay.cordova.apprate" spec="^1.1.7" />
    <plugin name="com.phonegap.plugins.PushPlugin" spec="https://github.com/phonegap-build/PushPlugin.git" />
    <plugin name="com.ionic.keyboard" spec="https://github.com/driftyco/ionic-plugins-keyboard.git" />
    <plugin name="cordova-plugin-geolocation" spec="^1.0.1" />
    <plugin name="cordova-plugin-splashscreen" spec="^2.1.0" />

Solution

  • I was having the same issue. Cordova also uses a /plugins/fetch.json file to control whether or not the plugins are already downloaded. You probably have this plugin declared only in your config.xml. Removing and adding the plugin using the cordova cli should fix the problem (should automatically add it to plugins/fetch.json)

    cordova plugin rm <problematic_plugin>
    cordova plugin add <problematic_plugin>
    

    Also the ionic keyboard plugin's id is actually ionic-plugin-keyboard. You should change it in your config.xml (removing the com.ionic.keyboard entry and adding it using the cli as mentioned above is a better option as it will add the plugin from the npm registry instead of getting it from the git repository).