0

For some reason I can't get GooglePlayServicesClient to work. I have followed the Setting Up Google Play Services guide. compile 'com.google.android.gms:play-services:7.5.0' is in the correct build.gradle file. I ran "Sync Project with Gradle Files". In the SDK Manager, I have installed Extras > Google Play services rev 25. On a clean build, I get the following errors:

Error:(20, 24) error: cannot access GooglePlayServicesClient
class file for com.google.android.gms.common.GooglePlayServicesClient not found

Error:(24, 28) error: cannot access OnConnectionFailedListener
class file for com.google.android.gms.common.GooglePlayServicesClient$OnConnectionFailedListener not found

Error:Execution failed for task ':app:compileDebugJava'.
> Compilation failed; see the compiler error output for details.

I've double checked that I followed the setup guide correctly, uninstalled and reinstalled the Google Play services from the SDK Manager, closed and reopened Android Studio, all with no success.

Thanks for the help.

1 Answers1

0

GooglePlayServiceClient no longer exist in 7.5, check latest guide, use GoogleApiClient instead

calvinfly
  • 443
  • 2
  • 10
  • That would have been kind of Google to note that the guide I was looking at has been deprecated. Anyway, on the imports, eg. `import com.google.android.gms.common.api.GoogleApiClient;` it gives the error "Cannot resolve symbol 'android'"? – scottyWatty Aug 12 '15 at 01:58
  • i can import it properly. try to clean and build project – calvinfly Aug 12 '15 at 02:36
  • Yeah. I've tried everything suggested [here](http://stackoverflow.com/questions/19508649/android-studio-says-cannot-resolve-symbol-but-project-compiles). I even created a new project, added the import and it still failed. I deleted the .gradle and .idea folders then reimported the new project. No success. I may either need to use old libraries that don't require com.google.android imports, or give up. – scottyWatty Aug 12 '15 at 04:39