0
votes

I am following the google drive android quick start sdk here. The only difference is that I am using intellij instead of eclipse.

The app throws an exception when uploading the file:

File file = service.files().insert(body, mediaContent).execute();

The exception message is access not configured.

Now googling this error yields some results:

I have checked in the google cloud console that both the drive api & the drive sdk are activated. I have registered an app with the correct package name. I also added google cloud storage just in case. What else should I check?

Edit

I am really confused by the documentation. This page mentions the getToken method, but the sample application uses GoogleAccountCredential.usingOAuth2 which documentation is Constructor a new instance using OAuth 2.0 scopes.

When registering the application, I get some information like client secret/client ID. I could find information here explaining how to use this data, but I could not find this kind of example for an android app.

1

1 Answers

0
votes

In the API Console, when you register/create an app, a Client ID is generated. Have you coded that Client ID into your app? The answer to the first SO link you gave has details.