Getting this error while upgrading firebase project from old domain to new google firebase domain.
Followed steps mentioned on the docs page of firebase.google.com
9.0.0 version of Firebase was built using Google Play services 9.0 and is now available under the new packaging
See Release Notes for Google Play services 9.0 https://developers.google.com/android/guides/releases#may_2016_-_v90
New versions of packages Google Play Services (rev 30) and Google Repository (rev 26) were just released in the SDK manager so it's likely you just need to update.
In Android Studio: