Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

com.google.android.gms.common.api.ApiException: 17: API: Drive.API_CONNECTIONLESS is not available on this device

Here is the story. I had integrated Google Drive Android SDK (8.1.0) into my app (AnyCopy) around three years ago. And I followed the tutorial to set up properly including adding credentials and api key. Everything worked okay. I could backup and restore my data without any problem. Even today it works okay if I download it from Google Play.

Recently I have been trying to refactor AnyCopy and integrate the newest Google Drive Android SDK (Google Play Service Version number 12.0.1 )into my app and experiencing a strange error with message

java.util.concurrent.ExecutionException: com.google.android.gms.common.api.ApiException: 17: API: Drive.API_CONNECTIONLESS is not available on this device. at com.google.android.gms.tasks.Tasks.zzc(Unknown Source) at com.google.android.gms.tasks.Tasks.await(Unknown Source)

However, if I create a new credential on Google Console with a different signing key. And the problem is resolved. I realize that the problem rooted from the credential configuration. However, I could not figure out how to resolve it as it might be a Google Drive SDK backwards compatibility bug. Anyone else has ever run into this issue? Any suggestion will he highly appreciated.

like image 416
Tony Thompson Avatar asked Mar 30 '18 05:03

Tony Thompson


1 Answers

I had the same error. I created a new project and got the credentials for the google API but forgot to enable the Google Drive API. Going to the dashboard and enabling the google drive API did the trick. Hope that helps.

like image 129
KoM Avatar answered Nov 01 '22 16:11

KoM