This week a new library version has been released from firebase. It seems that there is a missmatch between used libraries from google play. I faced the same and other similar errors during build process.
I used with the same version (
#GH-1057-April-05-android-build-issue) and it worked lasth month (31 May) without problems - yesterday, without any change of the plugins by myself, the build failed (Execution failed for task ‘:app:transformDexArchiveWithExternalLibsDexMergerForDebug’.)
After trying several things I could build again after install additional Gradle-Plugins for define version of google-play and firebase.
Try to define which firebase library you are using with this plugin, e.g.:
cordova plugin add cordova-android-firebase-gradle-release --variable FIREBASE_VERSION=17.+ --save
Then define which version of google play services you are using with the sister-plugin, e.g.:
cordova plugin add cordova-android-play-services-gradle-release --variable PLAY_SERVICES_VERSION=16.+ --save
Check if you have additional google plugins which depends also on google play service, e.g. cordova-plugin-googlemaps where you could define PLAY_SERVICE_VERSION as well
In my case it worked with FIREBASE_VERSION=17.+ and PLAY_SERVICES_VERSION=16.+
Hope it helps