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
For reference, from: https://developers.google.com/android/guides/releases
Google APIs for Android
March 20, 2018 - Version 12.0.0
Known Issues with version 12.0.0
We will provide an updated 12.0.1 release to address these issues soon.
My Workaround
(based on jeremy castelli's answer and keldar's subsequent comment)
I am using the following workaround (and I stress, this is a workaround).
Add the following to the bottom of build-extras.gradle, creating the file if necessary.
configurations.all {
resolutionStrategy {
force 'com.google.firebase:firebase-core:11.8+',
'com.google.firebase:firebase-messaging:11.8+',
'com.google.firebase:firebase-crash:11.8+',
'com.google.firebase:firebase-config:11.8+',
'com.google.firebase:firebase-auth:11.8+',
'com.google.android.gms:play-services-tagmanager:11.8+',
'com.google.android.gms:play-services-location:11.8+'
}
}
It is important to include all firebase and all android.gms library references, if you miss just one from here, it will still fail to build. Grep your gradle files for all the references. In my case I had missed firebase-auth which was referenced in the firebase plugin folder's .gradle file.
What resolutionStrategy force does is override the version choices made by the project/plugins and force gradle to reference a specific version.
There is no need to edit project.properties or any other gradle files using this workaround.