I had to migrate my android project to new version of Android Studio and Android pluging for Gradle.
I followed all instructions at https://developer.android.com/stu
I just had a similar problem, to solve it I googled and found out people suggesting to add 'google()' Gradle could not find dependency com.google.android.gms:play-services, but probably you have already done it since you followed the instructions.
In my case it wasnt enough, I noticed that i was using something that required a higher SdKVersion, so i just had to increase it to the right minSdkVersion.