Cannot resolve symbol GooglePlayServicesClient on new Android Studio Project

GooglePlayServicesClient class has been deprecated for some time. With latest GooglePlayServices release I believe they got rid of it completely.

However, demo project in AndroidStudio still uses old APIs, so it won’t compile 🙁

Essentially, for talking to GooglePlayServices, you should use GoogleApiClient now (as described here https://developer.android.com/google/auth/api-client.html)

Something like:

GoogleApiClient googleApiClient = new GoogleApiClient.Builder(this)
            .addApi(Plus.API)
            .addConnectionCallbacks(this)
            .addOnConnectionFailedListener(this)
            .build();

................

googleApiClient.connect();

Leave a Comment