Cannot resolve the symbol "GooglePlayServicesClient"

I am trying to transfer a project from Eclipse to Android Studio, the project can be created in Eclipse and successfully imported into Android Studio, however I get the Cannot resolve symbol 'GooglePlayServicesClient' error in Android Studio.

I went to the official tutorial for the imported Google Play service in Android Studio, and the other package “ com.google.android.gms.common.ConnectionResult ” that was used in my project does not have the same problem. Only " GooglePlayServicesClient " cannot be allowed.

issue

I also tried to clean and rebuild my project, but the problem persists. What am I doing wrong?

Update:

My build.gradle

 ... dependencies { compile project(':libraryListViewAnimations') compile 'com.android.support:support-v4:21.0.3' compile 'com.android.support:appcompat-v7:21.0.3' compile 'com.google.android.gms:play-services:+' compile 'com.google.android.gms:play-services:7.0.0' compile files('libs/activation.jar') compile files('libs/additionnal.jar') compile files('libs/commons-net-3.1-sources.jar') compile files('libs/commons-net-3.1.jar') compile files('libs/mail.jar') } 
+6
source share
2 answers

GooglePlayServicesClient is deprecated and is no longer included in the Google Play Services 7.x library. Instead, Google recommends using GoogleApiClient .

See Accessing the Google APIs in Android Developer Docs:

"Note: If you have an existing application that connects to Google Play services with a subclass of GooglePlayServicesClient, you should switch to GoogleApiClient as soon as possible."

+10
source

Have you added compile 'com.google.android.gms:play-services:7.0.0' to build.gradle? You can find more guidance here . I hope for this help.

0
source

Source: https://habr.com/ru/post/984264/


All Articles