GoogleApiClient .connect() Interface or Class
- If it’s your code, check the version play services ( com.google.android.gms:play-services-*).
- If you’re using a library, check if the library has a version using play services >= 8.1.0. If not, you’ll need to clone and upgrade it yourself.
The other day I got an interesting error coming out when running an app:
‘GoogleApiClient.connect()‘ was expected to be of type interface but was found to be virtual
The reason was a backwards incompatible change in 8.1.0 where GoogleApiClient changed its signature. Moreover, it was in a library using version 7.x while my app was using 8.4.
End solution was to clone the library code, make the changes and include the binary in the project. You may want to include the source code in your own project for more control (particularly if it’s not big).
SO has a quick-and-to-the-point reference.
A little experiment: If you find this post and ad below useful, please check the ad out 🙂