I'm getting an error in Android Studio for the following:
mGoogleApiClient = new GoogleApiClient.Builder(this) .addConnectionCallbacks(this) .addOnConnectionFailedListener(this) .addApi(LocationServices.API).build();
I have put this in my manifest, <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
and compile 'com.google.android.gms:play-services:6.5.87'
in my gradle dependencies.
I've downloaded the required sdk files as well.
Why do I still get this error?
Most often “R cannot be resolved” error appears if there is an issue with some of your resource files. Due to this error, you are unable to build your application. That's why we need to solve this error as it not getting away by just doing a simple restart or hitting Alt+Enter.
Figure 1: An illustration showing how the Google API Client provides an interface for connecting and making calls to any of the available Google Play services such as Google Play Games and Google Drive. To get started, you must first install the Google Play services library (revision 15 or higher) for your Android SDK.
Yeah GoogleApiClient has been deprecated. Particularly for the authentication api, you now need to use GoogleSignInClient .
For the benefit of searchers:
If you are following the android tutorial that relates to this, you can add the dependency via the UI.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With