I am trying to migrate a project from Eclipse to Android Studio, the project can be build in Eclipse and was successful imported to Android Studio, however, I get Cannot resolve symbol 'GooglePlayServicesClient'
error in Android Studio.
I followed the official tutorial to imported Google Play service in Android Studio, and an other package "com.google.android.gms.common.ConnectionResult
" that used in my project does not have same issue. Only 'GooglePlayServicesClient
' cannot be resolved.
I have also tried 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')
}
Did you add
compile 'com.google.android.gms:play-services:7.0.0'
to build.gradle? You can find more guide here . Hope this help.GooglePlayServicesClient is obsolete and no longer included in the Google Play Services 7.x library. Google recommends using the GoogleApiClient instead.
See Accessing Google APIs in the Android developer docs:
"Note: If you have an existing app that connects to Google Play services with a subclass of GooglePlayServicesClient, you should migrate to GoogleApiClient as soon as possible."