This error usually is caused when a same library is referenced more than once in gradle build configurati
The solution is very simple we’ve to remove the plugin that is causing the conflict. Issue the below provided two commands one after other.
Change the current directory to the ionic project and then issue the below commands.
[sourcecode language=”bash”]$ cordova plugin remove com.google.playservices // version 19
$ cordova plugin add com.google.playservices // version 21[/sourcecode]
Those command basically remove the conflicting plugin and then re-install it again. Somehow this fixes the issue but don’t know how this internally works perhaps configuration is re-written when plugin is added again.
Below references were used to solve this issue and you too might find them useful in case above command did not work for you.