There is a tricky inconsistency in the build.gradle(Module App) warnings that can lead to this error. I had all my play-services compiles:
compile 'com.google.android.gms:play-services-drive:9.6.1'
compile 'com.google.android.gms:play-services-plus:9.6.1'
--- etc ---
grayed out, with a note that a newer version, namely 9.8.0, was available after I upgraded various Google Play apks. After changing all the play-services compiles to 9.8.0:
compile 'com.google.android.gms:play-services-drive:9.8.0'
compile 'com.google.android.gms:play-services-plus:9.8.0'
---etc---
I got the weird error:
class file for com.google.android.gms.internal.zzanb not found
in attempting to compile my code. The tricky thing was all my firebase compiles:
compile 'com.google.firebase:firebase-core:9.6.1'
compile 'com.google.firebase:firebase-invites:9.6.1'
---etc---
were NOT grayed out, so I neglected to upgrade those compiles at the same time as I upgraded the play-services compiles. Upgrading all the firebase compiles to 9.8.0:
compile 'com.google.firebase:firebase-core:9.8.0'
compile 'com.google.firebase:firebase-invites:9.8.0'
--- etc ---
fixed the error.
Also, the warnings in the monitor when you get this error suggest depressing 'deprecation' and 'unchecked' lint warnings. That is unnecessary and doesn't fix it.
Android Studio should gray out both the firebase and play-services compiles together to avoid this error, particularly as the error message is so cryptic and the lint warning suppression suggestions don't work.