0

I want to use Google Drive API, so I follow the instructions (https://developers.google.com/drive/v3/web/quickstart/java) and got the error of compilation.

> c:\wd2>gradle -q run
юъЄ 19, 2016 8:54:50 PM com.google.api.client.util.store.FileDataStoreFactory se
tPermissionsToOwnerOnly
WARNING: unable to change permissions for everybody: C:\Users\Home\.credentials\
drive-java-quickstart
юъЄ 19, 2016 8:54:50 PM com.google.api.client.util.store.FileDataStoreFactory se
tPermissionsToOwnerOnly
WARNING: unable to change permissions for owner: C:\Users\Home\.credentials\driv
e-java-quickstart
Exception in thread "main" java.lang.IllegalArgumentException
        at com.google.api.client.repackaged.com.google.common.base.Preconditions
.checkArgument(Preconditions.java:111)
        at com.google.api.client.util.Preconditions.checkArgument(Preconditions.
java:37)
        at com.google.api.client.googleapis.auth.oauth2.GoogleClientSecrets.getD
etails(GoogleClientSecrets.java:82)
        at com.google.api.client.googleapis.auth.oauth2.GoogleAuthorizationCodeF
low$Builder.<init>(GoogleAuthorizationCodeFlow.java:195)
        at DriveQuickstart.authorize(DriveQuickstart.java:72)
        at DriveQuickstart.getDriveService(DriveQuickstart.java:91)
        at DriveQuickstart.main(DriveQuickstart.java:100)

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':run'.
> Process 'command 'C:\Program Files\Java\jdk1.8.0_101\bin\java.exe'' finished w
ith non-zero exit value 1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug
option to get more log output.

c:\wd2>

Can anyone help me to solve that problem?

Linda Lawton - DaImTo
  • 106,405
  • 32
  • 180
  • 449
Mikhail Nono
  • 93
  • 1
  • 9
  • wild guess: check C:\Users\Home\.credentials\driv e-java-quickstart make sure you script has permissions to write to that. – Linda Lawton - DaImTo Oct 19 '16 at 11:09
  • I checked it. My user has all privileges to write and read in the folder. – Mikhail Nono Oct 19 '16 at 11:12
  • That's the extent of my java help sorry. It has something to do with writing the datastore. More then that I cant help with. I fixed your tags should help someone spot the question who can help more then me. Welcome to stack. – Linda Lawton - DaImTo Oct 19 '16 at 11:19
  • Possible duplicate of [WARNING: unable to change permissions for everybody:](http://stackoverflow.com/questions/30634827/warning-unable-to-change-permissions-for-everybody) – bentrm Oct 19 '16 at 11:40
  • I found the solution. My client_secret.json has the wrong settings. So I get the new client_secret.json and application starts work. – Mikhail Nono Oct 19 '16 at 22:34

0 Answers0