Ionic plugin need to remove platform and read platform before it works

You can add all your plugins using the option --save:

cordova plugin add com.ionic.keyboard --save
cordova plugin add org.apache.cordova.camera --save

etc etc.

Or you can do it after all your plugins have been added:

cordova plugin save

You can do the same thing for your platform:

cordova platform add android --save

or later:

cordova platform save

these commands will add some new sections to your config.xml file:

<plugin name="org.apache.cordova.device" spec="^0.3.0" />
...

and

<engine name="android" spec="^4.0.0" />

now you can delete platforms and plugins folder and run:

cordova prepare

and it should create the platform and download all the plugins for you.

You can find some more info here.


Following steps helped me

ionic platform rm android
ionic platform add android
ionic plugin add https://github.com/apache/cordova-plugin-whitelist.git
ionic build android

Then you can deploy your apk