When I try to run the command ionic cordova build android out error as title above. Then I try to remove one of the gms, when I build again the del
1. Go to project.properties (in your platform folder)
2. I was using just google analytics in my "project.properties" and had to add " 11.+" to the end of the version and that worked for me. Not sure if that's long term fix but it did the trick.
cordova.system.library.2=com.google.android.gms:play-services-analytics:11.+