6

I'm trying to use Google Drive within my android app. For now I'm only trying to display the file names on the google drive. I used this tutorial https://developers.google.com/drive/quickstart-android to setup the google drive account in my app, and this https://developers.google.com/drive/v2/reference/files/list to retrieve a file listing.

In order to do so 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 an error and the files won't get 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 an up to date installation of Eclipse Juno with the Android SDK and the latest Google Play Service. I use an emulated device. The google-play-services.jar is in the reference libraries of my project. The google drive api v2 is also included like described in the tutorial described.

Any help is appreciated!

Paul Wolfger
  • 106
  • 1
  • 1
  • 7
  • This error is only associated with the emulator, on a real android device the app works fine. However as I do not have permanent access to an android device I really would like to see it running on the emulator. – Paul Wolfger Jan 10 '13 at 19:11
  • Hey Paul! I have the same issue on a device but one of my activity runs fine with Admob, other force closes giving the above mentioned error. can you help me in it? – M.Mohsin Jun 10 '14 at 08:00

3 Answers3

5

As the error message says, the version of Google Play Services on your emulated image is not up-to-date. Try checking if there's a newer Android image available for you to use.

Otherwise, it would be easier just to run the app on a physical device instead of the emulator.

Claudio Cherubino
  • 14,896
  • 1
  • 35
  • 42
  • No there isn't, as I said I checked everything and I have the latest version. Unfortunately I have no physical android device for now, so I have to stick with the emulator. – Paul Wolfger Jan 09 '13 at 22:11
  • I double checked, I have revision 4, in the install dialog it says: Archive Description Archive for any OS Size: 3,6 MiB SHA1: bbb3d11225fcf60a0bae75afa2c4737010468bf6 Can maybe someone confirm this SHA1 sum resp. the revision? – Paul Wolfger Jan 09 '13 at 22:21
1

The issue is you do not have Google Play Services on the Android device. You can side load Google Play Service APK's onto the emulator to resolve the issue.

Or you can use the Google API type of emulator but note that API 22 I hasn't been working for me but API 21 works witch is much easyer then finding the right version to install of the play service apks.

Hints on the APK's you likely need would be com.google.android.vending com.google.android.gsm and a bit of google love with your platform type.

1

Hope it helps someone facing issues now

This issue also comes when you updated your phone, and

  • didn't sign in on google account, so first open play store, sign in to your account.
  • didn't updated google chrome. and open google chrome and follow steps
  • if possible reboot phone.

and you are ready to go.

Shruti
  • 391
  • 1
  • 5
  • 21