the gradle dependency play-services-gcm was swapped to play-services-iid but still uses googlePlayServicesVersion to determine the package version.
This causes a problem play-services-gcm and play-services-iid versions differ.
See extract below from https://dl.google.com/dl/android/maven2/index.html:
play-services-gcm
16.0.0
16.1.0
17.0.0
play-services-iid
16.0.0
16.0.1
17.0.0
16.1.0 in play-services-gcm, but 16.0.1 in play-services-iid.
As a workaround I am now setting googlePlayServicesVersion to 16.0.0