GooglePlayServices unavailable due to error 2

I am trying to use Google Drive in my Android app. So far I'm only trying to display the file names on the Google drive. I used this https://developers.google.com/drive/quickstart-android tutorial to set up a Google account in my application and this https://developers.google.com/drive/v2/reference/files/list to retrieve a list of files.

To do this, I had to create an async task:

private class getCloudContentTask extends AsyncTask<Void, Void, Void> { protected void onPostExecute() { updateList(); } @Override protected Void doInBackground(Void... arg0) { cloudFiles = getCloudContent(); return null; } } 

getCloudContent is basically the retrieveAllFiles function from the tutorial.

However, I always get a couple of warnings and errors, and the files will not be displayed.

 01-09 19:39:31.347: W/dalvikvm(27926): VFY: unable to resolve static field 1488 (common_google_play_services_unknown_issue) in Lcom/google/android/gms/R$string; 01-09 19:39:31.347: D/dalvikvm(27926): VFY: replacing opcode 0x60 at 0x0004 01-09 19:39:31.446: W/GooglePlayServicesUtil(27926): Google Play services out of date. Requires 2012100 but found 1015 01-09 19:39:31.446: E/GoogleAuthUtil(27926): GooglePlayServices not available due to error 2 01-09 19:39:31.456: I/System.out(27926): An error occurred: com.google.api.client.googleapis.extensions.android.gms.auth.GooglePlayServicesAvailabilityIOException 

I have the latest installation of Eclipse Juno with the Android SDK and the latest Google Play service. I am using an emulated device. Google-play-services.jar is in the reference libraries of my project. The google api v2 drive is also included as described in the manual described.

Any help is appreciated!

+6
source share
3 answers

As the error message says, the version of Google Play Services in the emulated image is not updated. Try checking if a newer Android image is available to you.

Otherwise, it would be easier to just run the application on a physical device, and not in the emulator.

+5
source

The problem is that on the Android device you do not have Google Play Services. You can download the Google Play download in the APK on the emulator to solve the problem.

Or you can use an emulator like Google APIs, but note that API 22 I didn’t work for me, but API 21 works much easier than finding the right version to install aps play.

The tips in the APK that you most likely need will be com.google.android.vending com.google.android.gsm and a bit of love for Google with your platform type.

+1
source

Hope that now someone will run into problems

This issue also occurs when updating your phone and

  • did not log in to your google account, so first open the play store, log in to your account.
  • Google Chrome did not update. and open google chrome and follow the steps
  • if possible restart your phone.

and you are ready to go.

+1
source

All Articles