I'm trying the Quickstart: Run a Drive App on Android from Google Drive SDK. I have followed the hole process, but when I ran the app in my devices (real ones), it crashes with the following exception:
java.lang.NoClassDefFoundError: com.google.android.gms.common.AccountPicker
And finally, it points to my source in the second line of this code:
credential = GoogleAccountCredential.usingOAuth2(this, DriveScopes.DRIVE);
startActivityForResult(credential.newChooseAccountIntent(), REQUEST_ACCOUNT_PICKER); // <- This one
My confussion comes from the fact I have done everything the article instructs me to do:
I have generated the certificate
Enabled the API (with the certificate fingerprint)
Created and configurated the android project in Eclipse
- Added the APIs with the Google plugin
Copied the sample (I actually did copy-paste)
Ofcourse, I corrected the package and class names
Also I added the permissions for the App, even other permissions reffering to acounts
I even added the Google Play Android Developer API and its perimssions.
But when I run the App, it still crashes. All the libraries seem to be fine. I wonder if it is specific to Android APIv17, since my devices are APIv10 and APIv15 (I added the support library also).
Please, help. And excuse me for my bad english. Thank you.